We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Some times we need to change the opacity of objects. Having a class for this would be super convenient.
Have a classes like width is in base bootstrap where we would just use .o-25, .o-50, etc.
.o-25
.o-50
We can use opacity: x for all modern browsers and filter: alpha(opacity=x) for IE 8 and below.
opacity: x
filter: alpha(opacity=x)
@mixin opacity-variant ($parent, $value) { $percent: $value / 100; #{$parent}-#{$value} { opacity: $percent; filter: alpha(opacity=$value); } }
@include opacity-variant('.o', 0); @include opacity-variant('.o', 25); @include opacity-variant('.o', 50); @include opacity-variant('.o', 75); @include opacity-variant('.o', 100);
Fully spell out the class to be more descriptive: .opacity-25
.opacity-25
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Some times we need to change the opacity of objects. Having a class for this would be super convenient.
Solution
Have a classes like width is in base bootstrap where we would just use
.o-25
,.o-50
, etc.We can use
opacity: x
for all modern browsers andfilter: alpha(opacity=x)
for IE 8 and below.Mixin
Utility
Alternatives
Fully spell out the class to be more descriptive:
.opacity-25
The text was updated successfully, but these errors were encountered: