bulma/sass/base/helpers.sass

250 lines
4.9 KiB
Sass
Raw Normal View History

// Float
.is-clearfix
+clearfix
.is-pulled-left
float: left !important
.is-pulled-right
float: right !important
// Overflow
.is-clipped
overflow: hidden !important
// Overlay
.is-overlay
+overlay
2017-07-24 18:22:16 +00:00
// Typography
=typography-size($target:'')
@each $size in $sizes
$i: index($sizes, $size)
.is-size-#{$i}#{if($target == '', '', '-' + $target)}
2017-07-24 13:44:24 +00:00
font-size: $size !important
2017-07-19 21:52:22 +00:00
+typography-size()
+mobile
+typography-size('mobile')
+tablet
+typography-size('tablet')
+touch
+typography-size('touch')
+desktop
+typography-size('desktop')
+widescreen
+typography-size('widescreen')
+fullhd
+typography-size('fullhd')
$alignments: ('centered': 'center', 'justified': 'justify', 'left': 'left', 'right': 'right')
@each $alignment, $text-align in $alignments
.has-text-#{$alignment}
text-align: #{$text-align} !important
2018-04-08 18:22:26 +00:00
@each $alignment, $text-align in $alignments
+mobile
.has-text-#{$alignment}-mobile
text-align: #{$text-align} !important
+tablet
.has-text-#{$alignment}-tablet
text-align: #{$text-align} !important
+tablet-only
.has-text-#{$alignment}-tablet-only
text-align: #{$text-align} !important
+touch
.has-text-#{$alignment}-touch
text-align: #{$text-align} !important
+desktop
.has-text-#{$alignment}-desktop
text-align: #{$text-align} !important
+desktop-only
.has-text-#{$alignment}-desktop-only
text-align: #{$text-align} !important
+widescreen
.has-text-#{$alignment}-widescreen
text-align: #{$text-align} !important
+widescreen-only
.has-text-#{$alignment}-widescreen-only
text-align: #{$text-align} !important
+fullhd
.has-text-#{$alignment}-fullhd
text-align: #{$text-align} !important
.is-capitalized
text-transform: capitalize !important
.is-lowercase
text-transform: lowercase !important
.is-uppercase
text-transform: uppercase !important
.is-italic
font-style: italic !important
2017-03-27 07:49:27 +00:00
@each $name, $pair in $colors
$color: nth($pair, 1)
.has-text-#{$name}
2017-07-24 13:44:24 +00:00
color: $color !important
2017-03-27 07:49:27 +00:00
a.has-text-#{$name}
&:hover,
&:focus
2017-08-07 18:57:34 +00:00
color: darken($color, 10%) !important
2018-04-08 14:34:40 +00:00
.has-background-#{$name}
background-color: $color !important
2017-03-27 07:49:27 +00:00
2017-07-24 13:44:24 +00:00
@each $name, $shade in $shades
.has-text-#{$name}
color: $shade !important
.has-text-weight-light
font-weight: $weight-light !important
.has-text-weight-normal
font-weight: $weight-normal !important
.has-text-weight-semibold
font-weight: $weight-semibold !important
.has-text-weight-bold
font-weight: $weight-bold !important
// Visibility
2017-07-24 18:22:16 +00:00
$displays: 'block' 'flex' 'inline' 'inline-block' 'inline-flex'
@each $display in $displays
.is-#{$display}
2017-08-07 18:57:34 +00:00
display: #{$display} !important
2017-07-24 18:22:16 +00:00
+mobile
.is-#{$display}-mobile
display: #{$display} !important
+tablet
.is-#{$display}-tablet
display: #{$display} !important
+tablet-only
.is-#{$display}-tablet-only
display: #{$display} !important
+touch
.is-#{$display}-touch
display: #{$display} !important
+desktop
.is-#{$display}-desktop
display: #{$display} !important
+desktop-only
.is-#{$display}-desktop-only
display: #{$display} !important
+widescreen
.is-#{$display}-widescreen
display: #{$display} !important
+widescreen-only
.is-#{$display}-widescreen-only
display: #{$display} !important
+fullhd
.is-#{$display}-fullhd
display: #{$display} !important
2016-04-10 16:21:19 +00:00
.is-hidden
display: none !important
2017-07-20 18:02:58 +00:00
+mobile
.is-hidden-mobile
display: none !important
2017-07-20 18:02:58 +00:00
+tablet
.is-hidden-tablet
2016-05-07 12:31:31 +00:00
display: none !important
2017-07-20 18:02:58 +00:00
+tablet-only
.is-hidden-tablet-only
display: none !important
2017-07-20 18:02:58 +00:00
+touch
.is-hidden-touch
display: none !important
2017-07-20 18:02:58 +00:00
+desktop
.is-hidden-desktop
2016-05-07 12:31:31 +00:00
display: none !important
2017-07-20 18:02:58 +00:00
+desktop-only
.is-hidden-desktop-only
display: none !important
2017-07-20 18:02:58 +00:00
+widescreen
.is-hidden-widescreen
2016-05-07 12:31:31 +00:00
display: none !important
2017-07-24 18:22:16 +00:00
+widescreen-only
.is-hidden-widescreen-only
display: none !important
+fullhd
.is-hidden-fullhd
display: none !important
.is-invisible
visibility: hidden !important
+mobile
.is-invisible-mobile
visibility: hidden !important
+tablet
.is-invisible-tablet
visibility: hidden !important
+tablet-only
.is-invisible-tablet-only
visibility: hidden !important
+touch
.is-invisible-touch
visibility: hidden !important
+desktop
.is-invisible-desktop
visibility: hidden !important
+desktop-only
.is-invisible-desktop-only
visibility: hidden !important
+widescreen
.is-invisible-widescreen
visibility: hidden !important
+widescreen-only
.is-invisible-widescreen-only
visibility: hidden !important
+fullhd
.is-invisible-fullhd
visibility: hidden !important
// Other
2016-04-10 15:27:27 +00:00
.is-marginless
margin: 0 !important
.is-paddingless
padding: 0 !important
2017-07-24 18:36:40 +00:00
.is-radiusless
border-radius: 0 !important
2017-07-29 17:43:53 +00:00
.is-shadowless
box-shadow: none !important
2016-01-24 00:03:43 +00:00
.is-unselectable
2016-09-22 22:14:18 +00:00
+unselectable