KNACSS/sass/_library/_utilities.scss

288 lines
3 KiB
SCSS
Raw Normal View History

2015-12-12 11:20:29 +01:00
/* ---------------------------------- */
2016-05-20 08:58:56 +02:00
/* ==Helpers */
2015-12-12 11:20:29 +01:00
/* ---------------------------------- */
2016-05-20 08:58:56 +02:00
/* State Helpers */
/* ------------- */
2015-12-12 11:20:29 +01:00
/* invisible for all */
.is-hidden,
2017-08-01 10:53:59 +02:00
.js-hidden,
2015-12-12 11:20:29 +01:00
[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,
2017-08-01 10:53:59 +02:00
.js-disabled,
2017-08-01 09:20:53 +02:00
[disabled],
.is-disabled ~ label,
[disabled] ~ label {
2015-12-12 11:20:29 +01:00
opacity: 0.5;
2017-08-01 09:20:53 +02:00
cursor: not-allowed !important;
2015-12-12 11:20:29 +01:00
filter: grayscale(1);
}
ul {
&.is-unstyled,
&.unstyled {
list-style: none;
padding-left: 0;
}
2015-12-12 11:20:29 +01:00
}
2017-08-03 09:20:14 +02:00
.color--inverse {
2017-10-13 10:59:40 +02:00
color: $white;
2017-08-03 09:20:14 +02:00
}
2016-05-20 08:58:56 +02:00
/* Width Helpers */
/* ------------- */
2014-10-20 17:59:59 +02:00
/* blocks widths (percentage and pixels) */
$i: 100;
2014-10-20 17:59:59 +02:00
@while $i > 0 {
.w#{$i} {
width: $i * 1%;
}
$i: $i - 5;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.w66 {
width: calc(100% / 3 * 2);
2014-10-20 17:59:59 +02:00
}
.w33 {
width: calc(100% / 3);
2014-10-20 17:59:59 +02:00
}
$i: 1000;
2014-10-20 17:59:59 +02:00
.wauto {
width: auto;
2014-10-20 17:59:59 +02:00
}
.w960p {
width: 960px;
2014-10-20 17:59:59 +02:00
}
.mw960p {
max-width: 960px;
2014-10-20 17:59:59 +02:00
}
.w1140p {
width: 1140px;
2014-10-20 17:59:59 +02:00
}
.mw1140p {
max-width: 1140px;
2014-10-20 17:59:59 +02:00
}
@while $i > 0 {
.w#{$i}p {
width: $i * 1px;
}
$i: $i - 50;
2014-10-20 17:59:59 +02:00
}
2016-05-20 08:58:56 +02:00
/* Spacing Helpers */
/* --------------- */
2017-07-31 11:45:22 +02:00
.man,
.ma0 {
2015-07-01 13:47:48 +02:00
margin: 0;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.pan,
.pa0 {
2015-07-01 13:47:48 +02:00
padding: 0;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mas {
2015-07-01 13:47:48 +02:00
margin: $small-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mam {
2015-07-01 13:47:48 +02:00
margin: $medium-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mal {
2015-07-01 13:47:48 +02:00
margin: $large-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.pas {
2015-07-01 13:47:48 +02:00
padding: $small-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.pam {
2015-07-01 13:47:48 +02:00
padding: $medium-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.pal {
2015-07-01 13:47:48 +02:00
padding: $large-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mtn,
.mt0 {
2015-07-01 13:47:48 +02:00
margin-top: 0;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mts {
2015-07-01 13:47:48 +02:00
margin-top: $small-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mtm {
2015-07-01 13:47:48 +02:00
margin-top: $medium-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mtl {
2015-07-01 13:47:48 +02:00
margin-top: $large-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mrn,
.mr0 {
2015-07-01 13:47:48 +02:00
margin-right: 0;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mrs {
2015-07-01 13:47:48 +02:00
margin-right: $small-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mrm {
2015-07-01 13:47:48 +02:00
margin-right: $medium-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mrl {
2015-07-01 13:47:48 +02:00
margin-right: $large-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mbn,
.mb0 {
2015-07-01 13:47:48 +02:00
margin-bottom: 0;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mbs {
2015-07-01 13:47:48 +02:00
margin-bottom: $small-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mbm {
2015-07-01 13:47:48 +02:00
margin-bottom: $medium-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mbl {
2015-07-01 13:47:48 +02:00
margin-bottom: $large-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mln,
.ml0 {
2015-07-01 13:47:48 +02:00
margin-left: 0;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mls {
2015-07-01 13:47:48 +02:00
margin-left: $small-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mlm {
2015-07-01 13:47:48 +02:00
margin-left: $medium-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mll {
2015-07-01 13:47:48 +02:00
margin-left: $large-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.mauto {
2015-12-12 11:20:29 +01:00
margin: auto;
}
2017-07-31 11:45:22 +02:00
.mtauto {
2015-12-12 11:20:29 +01:00
margin-top: auto;
}
2017-07-31 11:45:22 +02:00
.mrauto {
2015-12-12 11:20:29 +01:00
margin-right: auto;
}
2017-07-31 11:45:22 +02:00
.mbauto {
2015-12-12 11:20:29 +01:00
margin-bottom: auto;
}
2017-07-31 11:45:22 +02:00
.mlauto {
2015-12-12 11:20:29 +01:00
margin-left: auto;
}
2017-07-31 11:45:22 +02:00
.ptn,
.pt0 {
2015-07-01 13:47:48 +02:00
padding-top: 0;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.pts {
2015-07-01 13:47:48 +02:00
padding-top: $small-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.ptm {
2015-07-01 13:47:48 +02:00
padding-top: $medium-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.ptl {
2015-07-01 13:47:48 +02:00
padding-top: $large-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.prn,
.pr0 {
2015-07-01 13:47:48 +02:00
padding-right: 0;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.prs {
2015-07-01 13:47:48 +02:00
padding-right: $small-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.prm {
2015-07-01 13:47:48 +02:00
padding-right: $medium-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.prl {
2015-07-01 13:47:48 +02:00
padding-right: $large-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.pbn,
.pb0 {
2015-07-01 13:47:48 +02:00
padding-bottom: 0;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.pbs {
2015-07-01 13:47:48 +02:00
padding-bottom: $small-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.pbm {
2015-07-01 13:47:48 +02:00
padding-bottom: $medium-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.pbl {
2015-07-01 13:47:48 +02:00
padding-bottom: $large-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.pln,
.pl0 {
2015-07-01 13:47:48 +02:00
padding-left: 0;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.pls {
2015-07-01 13:47:48 +02:00
padding-left: $small-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.plm {
2015-07-01 13:47:48 +02:00
padding-left: $medium-value;
2014-10-20 17:59:59 +02:00
}
2017-07-31 11:45:22 +02:00
.pll {
2015-07-01 13:47:48 +02:00
padding-left: $large-value;
}