Files
bulma/sass/helpers/typography.scss

171 lines
4.1 KiB
SCSS
Raw Normal View History

2024-11-11 10:22:12 +00:00
@use "sass:list";
2024-03-21 16:11:54 +00:00
@use "../utilities/derived-variables" as dv;
@use "../utilities/initial-variables" as iv;
@use "../utilities/mixins" as mx;
@mixin typography-size($target: "") {
@each $size in dv.$sizes {
2024-11-11 10:22:12 +00:00
$i: list.index(dv.$sizes, $size);
2024-03-21 16:11:54 +00:00
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-prefix}size-#{$i}#{if($target == "", "", "-" + $target)} {
2024-03-21 16:11:54 +00:00
font-size: $size !important;
}
}
}
@include typography-size;
@include mx.mobile {
@include typography-size("mobile");
}
@include mx.tablet {
@include typography-size("tablet");
}
@include mx.touch {
@include typography-size("touch");
}
@include mx.desktop {
@include typography-size("desktop");
}
@include mx.widescreen {
@include typography-size("widescreen");
}
@include mx.fullhd {
@include typography-size("fullhd");
}
$alignments: (
"centered": "center",
"justified": "justify",
"left": "left",
"right": "right",
);
@each $alignment, $text-align in $alignments {
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-has-prefix}text-#{$alignment} {
2024-03-21 16:11:54 +00:00
text-align: #{$text-align} !important;
}
}
@each $alignment, $text-align in $alignments {
@include mx.mobile {
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-has-prefix}text-#{$alignment}-mobile {
2024-03-21 16:11:54 +00:00
text-align: #{$text-align} !important;
}
}
@include mx.tablet {
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-has-prefix}text-#{$alignment}-tablet {
2024-03-21 16:11:54 +00:00
text-align: #{$text-align} !important;
}
}
@include mx.tablet-only {
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-has-prefix}text-#{$alignment}-tablet-only {
2024-03-21 16:11:54 +00:00
text-align: #{$text-align} !important;
}
}
@include mx.touch {
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-has-prefix}text-#{$alignment}-touch {
2024-03-21 16:11:54 +00:00
text-align: #{$text-align} !important;
}
}
@include mx.desktop {
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-has-prefix}text-#{$alignment}-desktop {
2024-03-21 16:11:54 +00:00
text-align: #{$text-align} !important;
}
}
@include mx.desktop-only {
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-has-prefix}text-#{$alignment}-desktop-only {
2024-03-21 16:11:54 +00:00
text-align: #{$text-align} !important;
}
}
@include mx.widescreen {
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-has-prefix}text-#{$alignment}-widescreen {
2024-03-21 16:11:54 +00:00
text-align: #{$text-align} !important;
}
}
@include mx.widescreen-only {
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-has-prefix}text-#{$alignment}-widescreen-only {
2024-03-21 16:11:54 +00:00
text-align: #{$text-align} !important;
}
}
@include mx.fullhd {
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-has-prefix}text-#{$alignment}-fullhd {
2024-03-21 16:11:54 +00:00
text-align: #{$text-align} !important;
}
}
}
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-prefix}capitalized {
2024-03-21 16:11:54 +00:00
text-transform: capitalize !important;
}
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-prefix}lowercase {
2024-03-21 16:11:54 +00:00
text-transform: lowercase !important;
}
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-prefix}uppercase {
2024-03-21 16:11:54 +00:00
text-transform: uppercase !important;
}
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-prefix}italic {
2024-03-21 16:11:54 +00:00
font-style: italic !important;
}
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-prefix}underlined {
2024-03-21 16:11:54 +00:00
text-decoration: underline !important;
}
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-has-prefix}text-weight-light {
2024-03-21 16:11:54 +00:00
font-weight: iv.$weight-light !important;
}
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-has-prefix}text-weight-normal {
2024-03-21 16:11:54 +00:00
font-weight: iv.$weight-normal !important;
}
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-has-prefix}text-weight-medium {
2024-03-21 16:11:54 +00:00
font-weight: iv.$weight-medium !important;
}
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-has-prefix}text-weight-semibold {
2024-03-21 16:11:54 +00:00
font-weight: iv.$weight-semibold !important;
}
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-has-prefix}text-weight-bold {
2024-03-21 16:11:54 +00:00
font-weight: iv.$weight-bold !important;
}
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-prefix}family-primary {
2024-03-21 16:11:54 +00:00
font-family: dv.$family-primary !important;
}
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-prefix}family-secondary {
2024-03-21 16:11:54 +00:00
font-family: dv.$family-secondary !important;
}
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-prefix}family-sans-serif {
2024-03-21 16:11:54 +00:00
font-family: iv.$family-sans-serif !important;
}
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-prefix}family-monospace {
2024-03-21 16:11:54 +00:00
font-family: iv.$family-monospace !important;
}
2024-12-27 21:25:24 +01:00
.#{iv.$class-prefix}#{iv.$helpers-prefix}family-code {
2024-03-21 16:11:54 +00:00
font-family: dv.$family-code !important;
}