Skip to content

Add transition to property-blacklist - #26922

Merged
XhmikosR merged 2 commits into
twbs:v4-devfrom
MartijnCuppens:transition-stylelint
Oct 21, 2018
Merged

XhmikosR merged 2 commits into
twbs:v4-devfrom
MartijnCuppens:transition-stylelint

Conversation

@MartijnCuppens

Copy link
Copy Markdown
Member

In each PR, we need to check manually if the @transition mixin is used instead of the transition property. By adding this stylelint rule, the css-lint command will take care of this.

@XhmikosR

Copy link
Copy Markdown
Member

@MartijnCuppens: there are more instances of transition in docs.

@MartijnCuppens

Copy link
Copy Markdown
Member Author

Changed it.

The stylelint check also happens on the custom css files. There are several ways we can handle this:

  1. Leave it as it is now (Add /* stylelint-disable-next-line property-blacklist */ above the transition declaration)

  2. Also add this query in the css files:

@media screen and (prefers-reduced-motion: reduce) {
  .selector {
    transition: none;
  }
}
  1. Change stylelint config in site/docs/4.1/examples/.stylelint

Which way do you want to go with this?

@XhmikosR

Copy link
Copy Markdown
Member

Hmmm... not sure to be honest.

@andresgalante @mdo thoughts?

Comment thread site/docs/4.1/examples/floating-labels/floating-labels.css Outdated
@XhmikosR

Copy link
Copy Markdown
Member

@MartijnCuppens: Perhaps you could to the same for other properties?

About the examples, we have a .stylelintrc in the examples folder. You can disable the check there instead of each CSS file.

https://github.com/twbs/bootstrap/blob/v4-dev/site/docs/4.1/examples/.stylelintrc

@XhmikosR XhmikosR left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@mdo mdo mentioned this pull request Oct 21, 2018
@XhmikosR
XhmikosR merged commit 00860f0 into twbs:v4-dev Oct 21, 2018
@MartijnCuppens
MartijnCuppens deleted the transition-stylelint branch October 21, 2018 19:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants