Skip to:
Content

BuddyPress.org

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#6474 closed enhancement (fixed)

Update SCSS mixin conditional syntax

Reported by: hnla's profile hnla Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.4 Priority: low
Severity: trivial Version:
Component: Templates Keywords:
Cc:

Description

A question arises over the correct syntax to use for conditional ternary operators in SCSS mixins, both of the following work:

@if($foo){ and @if $foo {

In the companion SCSS sheets the former has been used @if($foo){ however online most examples are without the braces.

This ticket just to remind us to re-examine and nail down whether either is acceptable or whether one is preferred and to change our usage to fit to best practise.

Change History (3)

#1 @johnjamesjacoby
9 years ago

  • Owner set to johnjamesjacoby
  • Resolution set to fixed
  • Status changed from new to closed

In 9930:

Theme Compat: Remove braces from $text-color @if conditions.

This change brings twentyfifteen.scss and twentyfourteen.scss into alignment with SCSS best practices.
See: http://sass-lang.com/documentation/file.SASS_REFERENCE.html#_9

Fixes #6474.

#2 @johnjamesjacoby
9 years ago

In 9933:

Theme Compat: Remove braces from $text-color @if conditions.

This change brings twentyfifteen.scss and twentyfourteen.scss into alignment with SCSS best practices.
See: http://sass-lang.com/documentation/file.SASS_REFERENCE.html#_9

Fixes #6474. (trunk)

#3 @DJPaul
8 years ago

  • Component changed from Appearance to Templates
Note: See TracTickets for help on using tickets.