KNACSS/sass/_library/_utilities.scss
Raphael Goetter 91d979b356 .js classes
2017-08-01 10:53:59 +02:00

283 lines
2.9 KiB
SCSS

/* ---------------------------------- */
/* ==Helpers */
/* ---------------------------------- */
/* State Helpers */
/* ------------- */
/* invisible for all */
.is-hidden,
.js-hidden,
[hidden] {
display: none;
}
/* hidden but not for an assistive technology like a screen reader, Yahoo! method */
.visually-hidden {
position: absolute !important;
border: 0 !important;
height: 1px !important;
width: 1px !important;
padding: 0 !important;
overflow: hidden !important;
clip: rect(0, 0, 0, 0) !important;
}
.is-disabled,
.js-disabled,
[disabled],
.is-disabled ~ label,
[disabled] ~ label {
opacity: 0.5;
cursor: not-allowed !important;
filter: grayscale(1);
}
ul {
&.is-unstyled,
&.unstyled {
list-style: none;
padding-left: 0;
}
}
/* Width Helpers */
/* ------------- */
/* blocks widths (percentage and pixels) */
$i: 100;
@while $i > 0 {
.w#{$i} {
width: $i * 1%;
}
$i: $i - 5;
}
.w66 {
width: calc(100% / 3 * 2);
}
.w33 {
width: calc(100% / 3);
}
$i: 1000;
.wauto {
width: auto;
}
.w960p {
width: 960px;
}
.mw960p {
max-width: 960px;
}
.w1140p {
width: 1140px;
}
.mw1140p {
max-width: 1140px;
}
@while $i > 0 {
.w#{$i}p {
width: $i * 1px;
}
$i: $i - 50;
}
/* Spacing Helpers */
/* --------------- */
.man,
.ma0 {
margin: 0;
}
.pan,
.pa0 {
padding: 0;
}
.mas {
margin: $small-value;
}
.mam {
margin: $medium-value;
}
.mal {
margin: $large-value;
}
.pas {
padding: $small-value;
}
.pam {
padding: $medium-value;
}
.pal {
padding: $large-value;
}
.mtn,
.mt0 {
margin-top: 0;
}
.mts {
margin-top: $small-value;
}
.mtm {
margin-top: $medium-value;
}
.mtl {
margin-top: $large-value;
}
.mrn,
.mr0 {
margin-right: 0;
}
.mrs {
margin-right: $small-value;
}
.mrm {
margin-right: $medium-value;
}
.mrl {
margin-right: $large-value;
}
.mbn,
.mb0 {
margin-bottom: 0;
}
.mbs {
margin-bottom: $small-value;
}
.mbm {
margin-bottom: $medium-value;
}
.mbl {
margin-bottom: $large-value;
}
.mln,
.ml0 {
margin-left: 0;
}
.mls {
margin-left: $small-value;
}
.mlm {
margin-left: $medium-value;
}
.mll {
margin-left: $large-value;
}
.mauto {
margin: auto;
}
.mtauto {
margin-top: auto;
}
.mrauto {
margin-right: auto;
}
.mbauto {
margin-bottom: auto;
}
.mlauto {
margin-left: auto;
}
.ptn,
.pt0 {
padding-top: 0;
}
.pts {
padding-top: $small-value;
}
.ptm {
padding-top: $medium-value;
}
.ptl {
padding-top: $large-value;
}
.prn,
.pr0 {
padding-right: 0;
}
.prs {
padding-right: $small-value;
}
.prm {
padding-right: $medium-value;
}
.prl {
padding-right: $large-value;
}
.pbn,
.pb0 {
padding-bottom: 0;
}
.pbs {
padding-bottom: $small-value;
}
.pbm {
padding-bottom: $medium-value;
}
.pbl {
padding-bottom: $large-value;
}
.pln,
.pl0 {
padding-left: 0;
}
.pls {
padding-left: $small-value;
}
.plm {
padding-left: $medium-value;
}
.pll {
padding-left: $large-value;
}