Skip to content

Having @include at the beginning of a selector vs the end #10

Open

Description

@dan-gamble

I'd argue you should have @include at the beginning as they tend to be a base that is added to. If they come at the end of the selector the styles will overwrite the ones you've declared on that declaration already.

Activity

  1. mikefowler commented on Jan 28, 2016

    @mikefowler

    Like many things put forth by styleguides, I think this too comes down to a matter of perspective. On the flip side, putting @include before the rest of your properties could result in another developer, unfamiliar with the content of the mixin, coming in and unintentionally overriding a property crucial to the intent of the mixin.

    ¯\_(ツ)_/¯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions