Gerillass
v2.1.0Type: Mixin
@include antialias();
* You can call mixins with or without the gls- namespace (e.g. @include gls-antialias();).
The Antialias Sass mixin provides smooth font rendering. It smooths fonts at the pixel level and prevents subpixel rendering.
Arguments
| Name | Type | Description |
|---|---|---|
$value | string | Accepts the only value. Use it when you want to apply the styles to one specific HTML element. |
Please check out the links at the end of the page for more information about font smoothing.
Examples
If you call it inside a selector without passing a value, the style rules apply to that element and all of its children.
.element{
@include antialias;
}.element, .element::before, .element::after,
.element *,
.element *::before,
.element *::after {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}Pass the only value as an argument to apply the style rules to only one specific HTML element.
.element{
@include antialias(only);
}.element, .element::before, .element::after {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}Call the mixin at the root of your stylesheet to target all the HTML elements.
@include antialias;*,
*::before,
*::after {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}