tailwind-to-style 2.2.11 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +20 -23
- package/package.json +1 -1
- package/preflight.css +1 -0
package/index.js
CHANGED
|
@@ -1630,34 +1630,37 @@ function generator$2i(configOptions = {}) {
|
|
|
1630
1630
|
|
|
1631
1631
|
const { backgroundColor = {} } = theme;
|
|
1632
1632
|
|
|
1633
|
-
const responsiveCssString = generateCssString(
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1633
|
+
const responsiveCssString = generateCssString(
|
|
1634
|
+
({ getCssByColors, isValidCssColor }) => {
|
|
1635
|
+
const cssString = getCssByColors(
|
|
1636
|
+
backgroundColor,
|
|
1637
|
+
(key, value, rgbValue) => {
|
|
1638
|
+
let rgbPropertyValue = "";
|
|
1639
|
+
if (rgbValue) {
|
|
1640
|
+
rgbPropertyValue = `background-color: rgba(${rgbValue}, var(--bg-opacity));`;
|
|
1641
|
+
}
|
|
1641
1642
|
|
|
1642
|
-
|
|
1643
|
-
|
|
1643
|
+
if (value === "custom_value") {
|
|
1644
|
+
return `
|
|
1644
1645
|
${prefix}-${key} {
|
|
1645
|
-
${
|
|
1646
|
+
${
|
|
1647
|
+
isValidCssColor(value) ? "background-color" : "background"
|
|
1648
|
+
}: ${value};
|
|
1646
1649
|
}
|
|
1647
1650
|
`;
|
|
1648
|
-
|
|
1651
|
+
}
|
|
1649
1652
|
|
|
1650
|
-
|
|
1653
|
+
return `
|
|
1651
1654
|
${prefix}-${key} {
|
|
1652
1655
|
--bg-opacity: 1;
|
|
1653
1656
|
background-color: ${value};
|
|
1654
1657
|
${rgbPropertyValue}
|
|
1655
1658
|
}
|
|
1656
1659
|
`;
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1660
|
+
}
|
|
1661
|
+
);
|
|
1662
|
+
return cssString;
|
|
1663
|
+
});
|
|
1661
1664
|
|
|
1662
1665
|
return responsiveCssString;
|
|
1663
1666
|
}
|
|
@@ -6319,11 +6322,5 @@ function twsx(obj) {
|
|
|
6319
6322
|
return cssString.trim();
|
|
6320
6323
|
}
|
|
6321
6324
|
|
|
6322
|
-
const tailwindCss = {
|
|
6323
|
-
raw: twString,
|
|
6324
|
-
object: cssObject,
|
|
6325
|
-
};
|
|
6326
|
-
|
|
6327
|
-
exports.tailwindCss = tailwindCss;
|
|
6328
6325
|
exports.tws = tws;
|
|
6329
6326
|
exports.twsx = twsx;
|
package/package.json
CHANGED
package/preflight.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
progress, sub, sup {vertical-align: baseline;}a, button {background-color: transparent;}blockquote, body, dd, dl, fieldset, figure, h1, h2, h3, h4, h5, h6, hr, ol, p, pre, ul {margin: 0;}button, hr, input {overflow: visible;}a, legend {color: inherit;}html {line-height: 1.15;-webkit-text-size-adjust: 100%;}details, main {display: block;}h1 {font-size: 2em;}code, kbd, pre, samp {font-size: 1em;}a {text-decoration: inherit;}abbr[title] {border-bottom: none;text-decoration: underline;-webkit-text-decoration: underline dotted;text-decoration: underline dotted;}b, strong {font-weight: bolder;}small {font-size: 80%;}sub, sup {font-size: 75%;line-height: 0;position: relative;}sub {bottom: -0.25em;}sup {top: -0.5em;}button, input, optgroup, select, textarea {font-family: inherit;font-size: 100%;line-height: 1.15;margin: 0;}button, select {text-transform: none;}[type="button"], [type="reset"], [type="submit"], button {-webkit-appearance: button;}[type="button"]::-moz-focus-inner, [type="reset"]::-moz-focus-inner, [type="submit"]::-moz-focus-inner, button::-moz-focus-inner {border-style: none;padding: 0;}[type="button"]:-moz-focusring, [type="reset"]:-moz-focusring, [type="submit"]:-moz-focusring, button:-moz-focusring {outline: ButtonText dotted 1px;}legend {box-sizing: border-box;display: table;max-width: 100%;padding: 0;white-space: normal;}textarea {overflow: auto;resize: vertical;}[type="checkbox"], [type="radio"] {box-sizing: border-box;padding: 0;}[type="number"]::-webkit-inner-spin-button, [type="number"]::-webkit-outer-spin-button {height: auto;}[type="search"] {-webkit-appearance: textfield;outline-offset: -2px;}[type="search"]::-webkit-search-decoration {-webkit-appearance: none;}::-webkit-file-upload-button {-webkit-appearance: button;font: inherit;}summary {display: list-item;}[hidden], template {display: none;}button {background-image: none;}fieldset {padding: 0;}ol, ul {list-style: none;padding: 0;}*, ::after, ::before {box-sizing: border-box;border: 0 solid #e2e8f0;}hr {box-sizing: content-box;height: 0;border-top-width: 1px;}img {border-style: solid;}input::-webkit-input-placeholder, textarea::-webkit-input-placeholder {color: #a0aec0;}input:-ms-input-placeholder, textarea:-ms-input-placeholder {color: #a0aec0;}input::-ms-input-placeholder, textarea::-ms-input-placeholder {color: #a0aec0;}input::placeholder, textarea::placeholder {color: #a0aec0;}[role="button"], button {cursor: pointer;}table {border-collapse: collapse;}h1, h2, h3, h4, h5, h6 {font-size: inherit;font-weight: inherit;}button, input, optgroup, select, textarea {padding: 0;line-height: inherit;color: inherit;}code, kbd, pre, samp {font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;}audio, canvas, embed, iframe, img, object, svg, video {display: block;vertical-align: middle;}img, video {max-width: 100%;height: auto;}.unreset a {color: #0366d6;}.unreset b, .unreset strong {font-weight: bold;}.unreset code, .unreset kbd, .unreset samp {font-family: monospace, monospace;}.unreset small {font-size: smaller;}.unreset sub {vertical-align: sub;font-size: smaller;bottom: none;}.unreset sup {vertical-align: super;font-size: smaller;top: none;}.unreset img {display: inline-block;}.unreset fieldset {display: block;margin-left: 2px;margin-right: 2px;padding-top: 0.35em;padding-bottom: 0.625em;padding-left: 0.75em;padding-right: 0.75em;border: 2px groove (internal value);}.unreset legend {display: block;padding-left: 2px;padding-right: 2px;border: none;}.unreset progress {vertical-align: baseline;}.unreset details {display: block;}.unreset summary {display: block;}.unreset blockquote {display: block;margin-top: 1em;margin-bottom: 1em;margin-left: 40px;margin-right: 40px;}.unreset dd {display: block;margin-left: 40px;}.unreset dl {display: block;margin-top: 1em;margin-bottom: 1em;margin-left: 0;margin-right: 0;}.unreset figure {display: block;margin-top: 1em;margin-bottom: 1em;margin-left: 40px;margin-right: 40px;}.unreset h1 {display: block;font-size: 2em;margin-top: 0.67em;margin-bottom: 0.67em;margin-left: 0;margin-right: 0;font-weight: bold;}.unreset h2 {display: block;font-size: 1.5em;margin-top: 0.83em;margin-bottom: 0.83em;margin-left: 0;margin-right: 0;font-weight: bold;}.unreset h3 {display: block;font-size: 1.17em;margin-top: 1em;margin-bottom: 1em;margin-left: 0;margin-right: 0;font-weight: bold;}.unreset h4 {display: block;margin-top: 1.33em;margin-bottom: 1.33em;margin-left: 0;margin-right: 0;font-weight: bold;}.unreset h5 {display: block;font-size: 0.83em;margin-top: 1.67em;margin-bottom: 1.67em;margin-left: 0;margin-right: 0;font-weight: bold;}.unreset h6 {display: block;font-size: 0.67em;margin-top: 2.33em;margin-bottom: 2.33em;margin-left: 0;margin-right: 0;font-weight: bold;}.unreset hr {display: block;margin-top: 0.5em;margin-bottom: 0.5em;margin-left: auto;margin-right: auto;border-style: inset;border-width: 1px;}.unreset p {display: block;margin-top: 1em;margin-bottom: 1em;margin-left: 0;margin-right: 0;}.unreset pre {display: block;font-family: monospace;white-space: pre;margin: 1em 0;}.unreset ol {display: block;list-style-type: decimal;margin-top: 1em;margin-bottom: 1em;margin-left: 0;margin-right: 0;padding-left: 40px;}.unreset ul {display: block;list-style-type: disc;margin-top: 1em;margin-bottom: 1 em;margin-left: 0;margin-right: 0;padding-left: 40px;}.unreset table {display: table;border-collapse: separate;border-spacing: 2px;border-color: gray;}
|