judocss
Version:
The functional CSS toolkit designed for minimal effort and maximum efficiency.
267 lines (253 loc) • 11 kB
JavaScript
"use strict";
module.exports = function (base) {
return {
"border-box": "{ box-sizing: border-box; }",
"inline": "{ display: inline; }",
"block": "{ display: block; }",
"list-item": "{ display: list-item; }",
"inline-block": "{ display: inline-block; }",
"flex": "{ display: flex; }",
"inline-flex": "{ display: inline-flex; }",
"left": "{ float: left; }",
"right": "{ float: right; }",
"clear-$x": function clear$x(x) {
return "{ clear: " + x + "; }";
},
"clear": "{ clear: both; }",
"width-$n": function width$n(n) {
return "{ width: " + base(n) + "; }";
},
"height-$n": function height$n(n) {
return "{ height: " + base(n) + "; }";
},
"full-width": "{ width: 100%; }",
"full-height": "{ height: 100%; }",
"max-width-$n": function maxWidth$n(n) {
return "{ max-width: " + base(n) + "; }";
},
"max-height-$n": function maxHeight$n(n) {
return "{ max-height: " + base(n) + "; }";
},
"min-width-$n": function minWidth$n(n) {
return "{ min-width: " + base(n) + "; }";
},
"min-height-$n": function minHeight$n(n) {
return "{ min-height: " + base(n) + "; }";
},
"vertical-align-$x": function verticalAlign$x(x) {
return "{ vertical-align: " + x + "; }";
},
"flex-wrap": "{ flex-wrap: wrap; }",
"flex-$n": function flex$n(n) {
return "{ flex: " + n + "; }";
},
"justify-content-$x": function justifyContent$x(x) {
return "{ justify-content: " + x + "; }";
},
"relative": "{ position: relative; }",
"absolute": "{ position: absolute; }",
"fixed": "{ position: fixed; }",
"sticky": "{ position: sticky; }",
"static": "{ position: static; }",
"top-$n": function top$n(n) {
return "{ top: " + base(n) + "; }";
},
"right-$n": function right$n(n) {
return "{ right: " + base(n) + "; }";
},
"bottom-$n": function bottom$n(n) {
return "{ bottom: " + base(n) + "; }";
},
"left-$n": function left$n(n) {
return "{ left: " + base(n) + "; }";
},
"overflow-$x": function overflow$x(x) {
return "{ overflow: ${x}; }";
},
"overflow-x-$x": function overflowX$x(x) {
return "{ overflow-x: ${x}; }";
},
"overflow-y-$x": function overflowY$x(x) {
return "{ overflow-y: ${x}; }";
},
"z-index-$n": function zIndex$n(n) {
return "{ z-index: " + n + "; }";
},
"line-height-$n": function lineHeight$n(n) {
return "{ line-height: " + base(n) + "; }";
},
"font-size-$n": function fontSize$n(n) {
return "{ font-size: " + base(n) + "; }";
},
"text-indent-$n": function textIndent$n(n) {
return "{ text-indent: " + base(n) + "; }";
},
"font-size-adjust-$n": function fontSizeAdjust$n(n) {
return "{ font-size-adjust: " + n + "; }";
},
"font-weight-$n": function fontWeight$n(n) {
return "{ font-weight: " + n + "; }";
},
"bold": "{ font-weight: bold; }",
"font-style-$x": function fontStyle$x(x) {
return "{ font-style: ${x}; }";
},
"italic": "{ font-style: italic; }",
"oblique": "{ font-style: oblique; }",
"uppercase": "{ text-transform: uppercase; }",
"lowercase": "{ text-transform: lowercase; }",
"caps": "{ text-transform: capitalize; }",
"underline": "{ text-decoration: underline; }",
"overline": "{ text-decoration: overline; }",
"line-through": "{ text-decoration: line-through; }",
"text-decoration-none": "{ text-decoration: none; }",
"text-left": "{ text-align: left; }",
"text-right": "{ text-align: right; }",
"text-center": "{ text-align: center; }",
"letter-spacing-$x": function letterSpacing$x(x) {
return "{ letter-spacing: " + base(x) + "; }";
},
"overflow-clip": "{ text-overflow: clip; }",
"overflow-ellipsis": "{ text-overflow: ellipsis; }",
"white-space-$x": function whiteSpace$x(x) {
return "{ white-space: ${x}; }";
},
"word-wrap-$x": function wordWrap$x(x) {
return "{ word-wrap: ${x}; }";
},
"word-spacing-$x": function wordSpacing$x(x) {
return "{ word-spacing: ${base(x)}; }";
},
"color-$x": function color$x(x) {
return "{ color: " + x + "; }";
},
"hsl-$h": function hsl$h(h) {
return "{ color: hsl(" + h + ",50%,50%); }";
},
"hsl-$h-$s": function hsl$h$s(h, s) {
return "{ color: hsl(" + h + "," + s + "%,50%); }";
},
"hsl-$h-$s-$l": function hsl$h$s$l(h, s, l) {
return "{ color: hsl(" + h + "," + s + "%," + l + "%); }";
},
"bg-$x": function bg$x(x) {
return "{ background-color: " + x + "; }";
},
"bg-hsl-$h": function bgHsl$h(h) {
return "{ background-color: hsl(" + h + ",50%,50%); }";
},
"bg-hsl-$h-$s": function bgHsl$h$s(h, s) {
return "{ background-color: hsl(" + h + "," + s + "%,50%); }";
},
"bg-hsl-$h-$s-$l": function bgHsl$h$s$l(h, s, l) {
return "{ background-color: hsl(" + h + "," + s + "%," + l + "%); }";
},
"border-color-$x": function borderColor$x(x) {
return "{ border-color: " + x + "; }";
},
"border-radius-$x": function borderRadius$x(x) {
return "{ border-radius: " + base(x) + "; }";
},
"border-style-$x": function borderStyle$x(x) {
return "{ border-style: " + x + "; }";
},
"border-$n": function border$n(n) {
return "{ border: " + base(n) + "; }";
},
"border-top-$n": function borderTop$n(n) {
return "{ border-top: " + base(n) + "; }";
},
"border-right-$n": function borderRight$n(n) {
return "{ border-right: " + base(n) + "; }";
},
"border-bottom-$n": function borderBottom$n(n) {
return "{ border-bottom: " + base(n) + "; }";
},
"border-left-$n": function borderLeft$n(n) {
return "{ border-left: " + base(n) + "; }";
},
"border-x-$n": function borderX$n(n) {
return "{ border-left: " + base(n) + "; border-right: " + base(n) + "; }";
},
"border-y-$n": function borderY$n(n) {
return "{ border-top: " + base(n) + "; border-bottom: " + base(n) + "; }";
},
"border-$y-$x": function border$y$x(y, x) {
return "{\n border-top: " + base(y) + "; border-bottom: " + base(y) + ";\n border-left: " + base(x) + "; border-right: " + base(x) + "; \n }";
},
"border-$n-$style-$color": function border$n$style$color(n, style, color) {
return "{\n border: " + base(n) + " " + style + " " + color + ";\n }";
},
"border-$t-$r-$b-$l": function border$t$r$b$l(top, right, bottom, left) {
return "{\n border-top: " + base(top) + "; border-bottom: " + base(bottom) + ";\n border-left: " + base(left) + "; border-right: " + base(right) + "; \n }";
},
"margin-$n": function margin$n(n) {
return "{ margin: " + base(n) + "; }";
},
"margin-top-$n": function marginTop$n(n) {
return "{ margin-top: " + base(n) + "; }";
},
"margin-right-$n": function marginRight$n(n) {
return "{ margin-right: " + base(n) + "; }";
},
"margin-bottom-$n": function marginBottom$n(n) {
return "{ margin-bottom: " + base(n) + "; }";
},
"margin-left-$n": function marginLeft$n(n) {
return "{ margin-left: " + base(n) + "; }";
},
"margin-x-$n": function marginX$n(n) {
return "{ margin-left: " + base(n) + "; margin-right: " + base(n) + "; }";
},
"margin-y-$n": function marginY$n(n) {
return "{ margin-top: " + base(n) + "; margin-bottom: " + base(n) + "; }";
},
"margin-$y-$x": function margin$y$x(y, x) {
return "{\n margin-top: " + base(y) + "; margin-bottom: " + base(y) + ";\n margin-left: " + base(x) + "; margin-right: " + base(x) + "; \n }";
},
"margin-$t-$r-$b-$l": function margin$t$r$b$l(top, right, bottom, left) {
return "{\n margin-top: " + base(top) + "; margin-bottom: " + base(bottom) + ";\n margin-left: " + base(left) + "; margin-right: " + base(right) + "; \n }";
},
"pad-$n": function pad$n(n) {
return "{ padding: " + base(n) + "; }";
},
"pad-top-$n": function padTop$n(n) {
return "{ padding-top: " + base(n) + "; }";
},
"pad-right-$n": function padRight$n(n) {
return "{ padding-right: " + base(n) + "; }";
},
"pad-bottom-$n": function padBottom$n(n) {
return "{ padding-bottom: " + base(n) + "; }";
},
"pad-left-$n": function padLeft$n(n) {
return "{ padding-left: " + base(n) + "; }";
},
"pad-x-$n": function padX$n(n) {
return "{ padding-left: " + base(n) + "; padding-right: " + base(n) + "; }";
},
"pad-y-$n": function padY$n(n) {
return "{ padding-top: " + base(n) + "; padding-bottom: " + base(n) + "; }";
},
"pad-$y-$x": function pad$y$x(y, x) {
return "{\n padding-top: " + base(y) + "; padding-bottom: " + base(y) + ";\n padding-left: " + base(x) + "; padding-right: " + base(x) + "; \n }";
},
"pad-$t-$r-$b-$l": function pad$t$r$b$l(top, right, bottom, left) {
return "{\n padding-top: " + base(top) + "; padding-bottom: " + base(bottom) + ";\n padding-left: " + base(left) + "; padding-right: " + base(right) + "; \n }";
},
"opacity-$n": function opacity$n(n) {
return "{ opacity: " + n / 100 + "; }";
},
"zoom-$n": function zoom$n(n) {
return "{ zoom: " + n + "; }";
},
"visible": "{ visibility: visible; }",
"hidden ": "{ visibility: hidden; }",
"cursor-$x": function cursor$x(x) {
return "{ cursor: " + x + "; }";
},
"resize-$x": function resize$x(x) {
return "{ resize: " + x + "; }";
}
};
};