Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transition() mixin prevent redundant 'transition: none' and pass null #30391

Merged
merged 5 commits into from Apr 1, 2020

Conversation

ysds
Copy link
Member

@ysds ysds commented Mar 14, 2020

This PR includes three points:

1. transition(null) and transition(none) output the following redundant CSS, but should be prevented.

@media (prefers-reduced-motion: reduce) {
  selector {
    transition: none;
  }
}

2. Fix the problem where libsass(node-sass) can't handle transition(null) well:

selector {
  @include transition(null);
}
// output
selector {
  transition:;
}

3. The transition mixin now show warning message when use none or null with multiple arguments.

Before: https://www.sassmeister.com/gist/b4d2d3ce8601116308e72df97a0d309a
After: https://www.sassmeister.com/gist/7ddae4ab995e0b41bbb93abe6eff616f

@ysds ysds requested a review from a team March 14, 2020 08:12
@ysds ysds added this to Inbox in v5.0.0-alpha2 via automation Mar 14, 2020
@ysds ysds added this to Inbox in v4.5.0 via automation Mar 14, 2020
@ysds
Copy link
Member Author

ysds commented Mar 14, 2020

I found a problem, please don't review yet.

@ysds
Copy link
Member Author

ysds commented Mar 14, 2020

OK, ready for review.

@ysds ysds changed the title transition() mixin prevent redundant 'none' for prefers-reduced-motion transition() mixin prevent redundant 'transition: none' and pass null Mar 14, 2020
v5.0.0-alpha2 automation moved this from Inbox to Approved Mar 14, 2020
@XhmikosR
Copy link
Member

Any reason we don't land this in v5?

@MartijnCuppens MartijnCuppens added this to Inbox in v5 via automation Apr 1, 2020
@MartijnCuppens MartijnCuppens removed this from Approved in v5.0.0-alpha2 Apr 1, 2020
@XhmikosR XhmikosR merged commit 053d5d5 into master Apr 1, 2020
v5 automation moved this from Inbox to Shipped Apr 1, 2020
@XhmikosR XhmikosR deleted the master-ysds-transition-mixin branch April 1, 2020 06:42
@XhmikosR XhmikosR moved this from Inbox to Needs manual backport in v4.5.0 Apr 2, 2020
MartijnCuppens added a commit that referenced this pull request Apr 6, 2020
transition() mixin prevent redundant 'transition: none' and pass `null`
@XhmikosR XhmikosR moved this from Needs manual backport to Cherry-picked in v4.5.0 Apr 6, 2020
XhmikosR pushed a commit that referenced this pull request Apr 7, 2020
transition() mixin prevent redundant 'transition: none' and pass `null`
XhmikosR pushed a commit that referenced this pull request Apr 10, 2020
transition() mixin prevent redundant 'transition: none' and pass `null`
XhmikosR pushed a commit that referenced this pull request Apr 13, 2020
transition() mixin prevent redundant 'transition: none' and pass `null`
@XhmikosR XhmikosR moved this from Cherry-picked to Shipped in v4.5.0 Apr 13, 2020
olsza pushed a commit to olsza/bootstrap that referenced this pull request Oct 3, 2020
…l` (twbs#30391)

* Prevent redundant 'none' for prefers-reduced-motion

* Output warning when use 'none' or 'null' with multiple arguments

* Fix for libsass(node-sass)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v4.5.0
  
Shipped
v5
  
Shipped
Development

Successfully merging this pull request may close these issues.

None yet

3 participants