Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
experimental: support breakpoints in css parser (#3685)
Bogdan Chadkinf988e2b918f5
diff --git a/apps/builder/app/shared/copy-paste/plugin-webflow/__generated__/style-presets.ts b/apps/builder/app/shared/copy-paste/plugin-webflow/__generated__/style-presets.tsindex ba35b4e6f7..9c350dfbe0 100644--- a/apps/builder/app/shared/copy-paste/plugin-webflow/__generated__/style-presets.ts+++ b/apps/builder/app/shared/copy-paste/plugin-webflow/__generated__/style-presets.ts@@ -348,6 +348,25 @@ export const styles = {value: "inline-block",},},+ {+ selector: "audio",+ property: "height",+ value: {+ type: "unit",+ unit: "number",+ value: 0,+ },+ state: ":not",+ },+ {+ selector: "audio",+ property: "display",+ value: {+ type: "keyword",+ value: "none",+ },+ state: ":not",+ },],canvas: [{@@ -437,40 +456,40 @@ export const styles = {},{selector: "a",- property: "outlineWidth",+ property: "outlineStyle",value: {- type: "unit",- unit: "number",- value: 0,+ type: "keyword",+ value: "none",},- state: ":hover",+ state: ":active",},{selector: "a",- property: "outlineStyle",+ property: "outlineColor",value: {type: "keyword",- value: "none",+ value: "currentColor",},state: ":active",},{selector: "a",- property: "outlineStyle",+ property: "outlineWidth",value: {- type: "keyword",- value: "none",+ type: "unit",+ unit: "number",+ value: 0,},state: ":hover",},{selector: "a",- property: "outlineColor",+ property: "outlineStyle",value: {type: "keyword",- value: "currentColor",+ value: "none",},- state: ":active",+ state: ":hover",},{selector: "a",@@ -970,6 +989,26 @@ export const styles = {},},],+ svg: [+ {+ selector: "svg",+ property: "overflowX",+ value: {+ type: "keyword",+ value: "hidden",+ },+ state: ":not",+ },+ {+ selector: "svg",+ property: "overflowY",+ value: {+ type: "keyword",+ value: "hidden",+ },+ state: ":not",+ },+ ],hr: [{selector: "hr",@@ -1600,6 +1639,7 @@ export const styles = {unit: "number",value: 0,},+ state: "::-moz-focus-inner",},{selector: "input",@@ -1609,6 +1649,7 @@ export const styles = {unit: "number",value: 0,},+ state: "::-moz-focus-inner",},{selector: "input",@@ -1618,6 +1659,7 @@ export const styles = {unit: "number",value: 0,},+ state: "::-moz-focus-inner",},{selector: "input",@@ -1627,6 +1669,7 @@ export const styles = {unit: "number",value: 0,},+ state: "::-moz-focus-inner",},{selector: "input",@@ -1635,6 +1678,7 @@ export const styles = {type: "keyword",value: "none",},+ state: "::-moz-focus-inner",},{selector: "input",@@ -1643,6 +1687,7 @@ export const styles = {type: "keyword",value: "none",},+ state: "::-moz-focus-inner",},{selector: "input",@@ -1651,6 +1696,7 @@ export const styles = {type: "keyword",value: "none",},+ state: "::-moz-focus-inner",},{selector: "input",@@ -1659,6 +1705,7 @@ export const styles = {type: "keyword",value: "none",},+ state: "::-moz-focus-inner",},{selector: "input",@@ -1667,6 +1714,7 @@ export const styles = {type: "keyword",value: "currentColor",},+ state: "::-moz-focus-inner",},{selector: "input",@@ -1675,6 +1723,7 @@ export const styles = {type: "keyword",value: "currentColor",},+ state: "::-moz-focus-inner",},{selector: "input",@@ -1683,6 +1732,7 @@ export const styles = {type: "keyword",value: "currentColor",},+ state: "::-moz-focus-inner",},{selector: "input",@@ -1691,6 +1741,7 @@ export const styles = {type: "keyword",value: "currentColor",},+ state: "::-moz-focus-inner",},{selector: "input",@@ -1700,6 +1751,7 @@ export const styles = {unit: "number",value: 0,},+ state: "::-moz-focus-inner",},{selector: "input",@@ -1709,6 +1761,7 @@ export const styles = {unit: "number",value: 0,},+ state: "::-moz-focus-inner",},{selector: "input",@@ -1718,6 +1771,7 @@ export const styles = {unit: "number",value: 0,},+ state: "::-moz-focus-inner",},{selector: "input",@@ -1727,6 +1781,7 @@ export const styles = {unit: "number",value: 0,},+ state: "::-moz-focus-inner",},{selector: "input",@@ -1736,6 +1791,42 @@ export const styles = {value: "border-box",},},+ {+ selector: "input",+ property: "paddingTop",+ value: {+ type: "unit",+ unit: "number",+ value: 0,+ },+ },+ {+ selector: "input",+ property: "paddingRight",+ value: {+ type: "unit",+ unit: "number",+ value: 0,+ },+ },+ {+ selector: "input",+ property: "paddingBottom",+ value: {+ type: "unit",+ unit: "number",+ value: 0,+ },+ },+ {+ selector: "input",+ property: "paddingLeft",+ value: {+ type: "unit",+ unit: "number",+ value: 0,+ },+ },{selector: "input",property: "height",@@ -2277,39 +2368,6 @@ export const styles = {value: 0,},},- {- selector: "td",- property: "fontFamily",- value: {- type: "unparsed",- value: "webflow-icons",- },- },- {- selector: "td",- property: "src",- value: {- type: "unparsed",- value:- 'url(data:application/x-font-ttf;charset=utf-8;base64,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)format("truetype")',- },- },- {- selector: "td",- property: "fontWeight",- value: {- type: "keyword",- value: "normal",- },- },- {- selector: "td",- property: "fontStyle",- value: {- type: "keyword",- value: "normal",- },- },],th: [{@@ -2348,39 +2406,6 @@ export const styles = {value: 0,},},- {- selector: "th",- property: "fontFamily",- value: {- type: "unparsed",- value: "webflow-icons",- },- },- {- selector: "th",- property: "src",- value: {- type: "unparsed",- value:- 'url(data:application/x-font-ttf;charset=utf-8;base64,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)format("truetype")',- },- },- {- selector: "th",- property: "fontWeight",- value: {- type: "keyword",- value: "normal",- },- },- {- selector: "th",- property: "fontStyle",- value: {- type: "keyword",- value: "normal",- },- },],"w-icon-slider-right": [{@@ -2606,6 +2631,7 @@ export const styles = {type: "unparsed",value: '""',},+ state: ":before",},{selector: "w-icon-dropdown-toggle",@@ -2853,63 +2879,63 @@ export const styles = {},{selector: "w-clearfix",- property: "gridRowStart",+ property: "gridColumnStart",value: {type: "unit",unit: "number",value: 1,},- state: ":after",+ state: ":before",},{selector: "w-clearfix",- property: "gridColumnStart",+ property: "gridRowEnd",value: {type: "unit",unit: "number",- value: 1,+ value: 2,},state: ":before",},{selector: "w-clearfix",- property: "gridColumnStart",+ property: "gridColumnEnd",value: {type: "unit",unit: "number",- value: 1,+ value: 2,},- state: ":after",+ state: ":before",},{selector: "w-clearfix",- property: "gridRowEnd",+ property: "gridRowStart",value: {type: "unit",unit: "number",- value: 2,+ value: 1,},- state: ":before",+ state: ":after",},{selector: "w-clearfix",- property: "gridRowEnd",+ property: "gridColumnStart",value: {type: "unit",unit: "number",- value: 2,+ value: 1,},state: ":after",},{selector: "w-clearfix",- property: "gridColumnEnd",+ property: "gridRowEnd",value: {type: "unit",unit: "number",value: 2,},- state: ":before",+ state: ":after",},{selector: "w-clearfix",@@ -4637,63 +4663,63 @@ export const styles = {},{selector: "w-embed",- property: "gridRowStart",+ property: "gridColumnStart",value: {type: "unit",unit: "number",value: 1,},- state: ":after",+ state: ":before",},{selector: "w-embed",- property: "gridColumnStart",+ property: "gridRowEnd",value: {type: "unit",unit: "number",- value: 1,+ value: 2,},state: ":before",},{selector: "w-embed",- property: "gridColumnStart",+ property: "gridColumnEnd",value: {type: "unit",unit: "number",- value: 1,+ value: 2,},- state: ":after",+ state: ":before",},{selector: "w-embed",- property: "gridRowEnd",+ property: "gridRowStart",value: {type: "unit",unit: "number",- value: 2,+ value: 1,},- state: ":before",+ state: ":after",},{selector: "w-embed",- property: "gridRowEnd",+ property: "gridColumnStart",value: {type: "unit",unit: "number",- value: 2,+ value: 1,},state: ":after",},{selector: "w-embed",- property: "gridColumnEnd",+ property: "gridRowEnd",value: {type: "unit",unit: "number",value: 2,},- state: ":before",+ state: ":after",},{selector: "w-embed",@@ -4969,6 +4995,17 @@ export const styles = {value: "not-allowed",},},+ {+ selector: "fieldset",+ property: "backgroundColor",+ value: {+ type: "rgb",+ alpha: 1,+ r: 238,+ g: 238,+ b: 238,+ },+ },],"w-form": [{@@ -5192,9 +5229,9 @@ export const styles = {value: {type: "rgb",alpha: 1,- r: 255,- g: 255,- b: 255,+ r: 238,+ g: 238,+ b: 238,},},{@@ -5535,9 +5572,9 @@ export const styles = {value: {type: "rgb",alpha: 1,- r: 153,- g: 153,- b: 153,+ r: 51,+ g: 51,+ b: 51,},},{@@ -5633,9 +5670,9 @@ export const styles = {value: {type: "rgb",alpha: 1,- r: 56,- g: 152,- b: 236,+ r: 204,+ g: 204,+ b: 204,},},{@@ -5644,9 +5681,9 @@ export const styles = {value: {type: "rgb",alpha: 1,- r: 56,- g: 152,- b: 236,+ r: 204,+ g: 204,+ b: 204,},},{@@ -5655,9 +5692,9 @@ export const styles = {value: {type: "rgb",alpha: 1,- r: 56,- g: 152,- b: 236,+ r: 204,+ g: 204,+ b: 204,},},{@@ -5666,9 +5703,9 @@ export const styles = {value: {type: "rgb",alpha: 1,- r: 56,- g: 152,- b: 236,+ r: 204,+ g: 204,+ b: 204,},},{@@ -5759,6 +5796,30 @@ export const styles = {value: "block",},},+ {+ selector: "w-select",+ property: "color",+ value: {+ type: "rgb",+ alpha: 1,+ r: 153,+ g: 153,+ b: 153,+ },+ state: ":-moz-placeholder",+ },+ {+ selector: "w-select",+ property: "color",+ value: {+ type: "rgb",+ alpha: 1,+ r: 153,+ g: 153,+ b: 153,+ },+ state: "::-moz-placeholder",+ },{selector: "w-select",property: "opacity",@@ -5767,6 +5828,67 @@ export const styles = {unit: "number",value: 1,},+ state: "::-moz-placeholder",+ },+ {+ selector: "w-select",+ property: "color",+ value: {+ type: "rgb",+ alpha: 1,+ r: 153,+ g: 153,+ b: 153,+ },+ state: "::-webkit-input-placeholder",+ },+ {+ selector: "w-select",+ property: "borderTopColor",+ value: {+ type: "rgb",+ alpha: 1,+ r: 56,+ g: 152,+ b: 236,+ },+ state: ":focus",+ },+ {+ selector: "w-select",+ property: "borderRightColor",+ value: {+ type: "rgb",+ alpha: 1,+ r: 56,+ g: 152,+ b: 236,+ },+ state: ":focus",+ },+ {+ selector: "w-select",+ property: "borderBottomColor",+ value: {+ type: "rgb",+ alpha: 1,+ r: 56,+ g: 152,+ b: 236,+ },+ state: ":focus",+ },+ {+ selector: "w-select",+ property: "borderLeftColor",+ value: {+ type: "rgb",+ alpha: 1,+ r: 56,+ g: 152,+ b: 236,+ },+ state: ":focus",},{selector: "w-select",@@ -5776,6 +5898,7 @@ export const styles = {unit: "number",value: 0,},+ state: ":focus",},{selector: "w-select",@@ -5784,6 +5907,7 @@ export const styles = {type: "keyword",value: "none",},+ state: ":focus",},{selector: "w-select",@@ -5792,6 +5916,7 @@ export const styles = {type: "keyword",value: "currentColor",},+ state: ":focus",},{selector: "w-select",@@ -5907,63 +6032,63 @@ export const styles = {},{selector: "w-radio",- property: "gridRowStart",+ property: "gridColumnStart",value: {type: "unit",unit: "number",value: 1,},- state: ":after",+ state: ":before",},{selector: "w-radio",- property: "gridColumnStart",+ property: "gridRowEnd",value: {type: "unit",unit: "number",- value: 1,+ value: 2,},state: ":before",},{selector: "w-radio",- property: "gridColumnStart",+ property: "gridColumnEnd",value: {type: "unit",unit: "number",- value: 1,+ value: 2,},- state: ":after",+ state: ":before",},{selector: "w-radio",- property: "gridRowEnd",+ property: "gridRowStart",value: {type: "unit",unit: "number",- value: 2,+ value: 1,},- state: ":before",+ state: ":after",},{selector: "w-radio",- property: "gridRowEnd",+ property: "gridColumnStart",value: {type: "unit",unit: "number",- value: 2,+ value: 1,},state: ":after",},{selector: "w-radio",- property: "gridColumnEnd",+ property: "gridRowEnd",value: {type: "unit",unit: "number",value: 2,},- state: ":before",+ state: ":after",},{selector: "w-radio",@@ -7171,8 +7296,9 @@ export const styles = {selector: "w-container",property: "maxWidth",value: {- type: "keyword",- value: "none",+ type: "unit",+ unit: "px",+ value: 940,},},{@@ -7221,63 +7347,63 @@ export const styles = {},{selector: "w-container",- property: "gridRowStart",+ property: "gridColumnStart",value: {type: "unit",unit: "number",value: 1,},- state: ":after",+ state: ":before",},{selector: "w-container",- property: "gridColumnStart",+ property: "gridRowEnd",value: {type: "unit",unit: "number",- value: 1,+ value: 2,},state: ":before",},{selector: "w-container",- property: "gridColumnStart",+ property: "gridColumnEnd",value: {type: "unit",unit: "number",- value: 1,+ value: 2,},- state: ":after",+ state: ":before",},{selector: "w-container",- property: "gridRowEnd",+ property: "gridRowStart",value: {type: "unit",unit: "number",- value: 2,+ value: 1,},- state: ":before",+ state: ":after",},{selector: "w-container",- property: "gridRowEnd",+ property: "gridColumnStart",value: {type: "unit",unit: "number",- value: 2,+ value: 1,},state: ":after",},{selector: "w-container",- property: "gridColumnEnd",+ property: "gridRowEnd",value: {type: "unit",unit: "number",value: 2,},- state: ":before",+ state: ":after",},{selector: "w-container",@@ -7316,6 +7442,25 @@ export const styles = {},state: ":after",},+ {+ selector: "w-container",+ property: "maxWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 728,+ },+ breakpoint: "(max-width:991px)",+ },+ {+ selector: "w-container",+ property: "maxWidth",+ value: {+ type: "keyword",+ value: "none",+ },+ breakpoint: "(max-width:479px)",+ },],"w-row": [{@@ -7348,63 +7493,63 @@ export const styles = {},{selector: "w-row",- property: "gridRowStart",+ property: "gridColumnStart",value: {type: "unit",unit: "number",value: 1,},- state: ":after",+ state: ":before",},{selector: "w-row",- property: "gridColumnStart",+ property: "gridRowEnd",value: {type: "unit",unit: "number",- value: 1,+ value: 2,},state: ":before",},{selector: "w-row",- property: "gridColumnStart",+ property: "gridColumnEnd",value: {type: "unit",unit: "number",- value: 1,+ value: 2,},- state: ":after",+ state: ":before",},{selector: "w-row",- property: "gridRowEnd",+ property: "gridRowStart",value: {type: "unit",unit: "number",- value: 2,+ value: 1,},- state: ":before",+ state: ":after",},{selector: "w-row",- property: "gridRowEnd",+ property: "gridColumnStart",value: {type: "unit",unit: "number",- value: 2,+ value: 1,},state: ":after",},{selector: "w-row",- property: "gridColumnEnd",+ property: "gridRowEnd",value: {type: "unit",unit: "number",value: 2,},- state: ":before",+ state: ":after",},{selector: "w-row",@@ -7451,6 +7596,7 @@ export const styles = {unit: "number",value: 0,},+ breakpoint: "(max-width:767px)",},{selector: "w-row",@@ -7460,6 +7606,7 @@ export const styles = {unit: "number",value: 0,},+ breakpoint: "(max-width:767px)",},],"w-col": [@@ -7515,6 +7662,16 @@ export const styles = {value: "relative",},},+ {+ selector: "w-col",+ property: "width",+ value: {+ type: "unit",+ unit: "%",+ value: 100,+ },+ breakpoint: "(max-width:767px)",+ },{selector: "w-col",property: "left",@@ -7522,6 +7679,7 @@ export const styles = {type: "keyword",value: "auto",},+ breakpoint: "(max-width:767px)",},{selector: "w-col",@@ -7530,6 +7688,17 @@ export const styles = {type: "keyword",value: "auto",},+ breakpoint: "(max-width:767px)",+ },+ {+ selector: "w-col",+ property: "width",+ value: {+ type: "unit",+ unit: "%",+ value: 100,+ },+ breakpoint: "(max-width:479px)",},],"w-col-1": [@@ -7670,43 +7839,91 @@ export const styles = {property: "display",value: {type: "keyword",- value: "inherit",+ value: "none",},},- ],- "w-hidden-medium": [{- selector: "w-hidden-medium",+ selector: "w-hidden-main",property: "display",value: {type: "keyword",value: "inherit",},+ breakpoint: "(max-width:991px)",},- ],- "w-col-medium-1": [{- selector: "w-col-medium-1",- property: "width",+ selector: "w-hidden-main",+ property: "display",value: {- type: "unit",- unit: "%",- value: 8.33333,+ type: "keyword",+ value: "inherit",},+ breakpoint: "(max-width:767px)",},- ],- "w-col-medium-2": [{- selector: "w-col-medium-2",- property: "width",+ selector: "w-hidden-main",+ property: "display",value: {- type: "unit",- unit: "%",- value: 16.6667,+ type: "keyword",+ value: "inherit",},+ breakpoint: "(max-width:479px)",},],- "w-col-medium-3": [+ "w-hidden-medium": [+ {+ selector: "w-hidden-medium",+ property: "display",+ value: {+ type: "keyword",+ value: "none",+ },+ breakpoint: "(max-width:991px)",+ },+ {+ selector: "w-hidden-medium",+ property: "display",+ value: {+ type: "keyword",+ value: "inherit",+ },+ breakpoint: "(max-width:767px)",+ },+ {+ selector: "w-hidden-medium",+ property: "display",+ value: {+ type: "keyword",+ value: "inherit",+ },+ breakpoint: "(max-width:479px)",+ },+ ],+ "w-col-medium-1": [+ {+ selector: "w-col-medium-1",+ property: "width",+ value: {+ type: "unit",+ unit: "%",+ value: 8.33333,+ },+ breakpoint: "(max-width:991px)",+ },+ ],+ "w-col-medium-2": [+ {+ selector: "w-col-medium-2",+ property: "width",+ value: {+ type: "unit",+ unit: "%",+ value: 16.6667,+ },+ breakpoint: "(max-width:991px)",+ },+ ],+ "w-col-medium-3": [{selector: "w-col-medium-3",property: "width",@@ -7715,6 +7932,7 @@ export const styles = {unit: "%",value: 25,},+ breakpoint: "(max-width:991px)",},],"w-col-medium-4": [@@ -7726,6 +7944,7 @@ export const styles = {unit: "%",value: 33.3333,},+ breakpoint: "(max-width:991px)",},],"w-col-medium-5": [@@ -7737,6 +7956,7 @@ export const styles = {unit: "%",value: 41.6667,},+ breakpoint: "(max-width:991px)",},],"w-col-medium-6": [@@ -7748,6 +7968,7 @@ export const styles = {unit: "%",value: 50,},+ breakpoint: "(max-width:991px)",},],"w-col-medium-7": [@@ -7759,6 +7980,7 @@ export const styles = {unit: "%",value: 58.3333,},+ breakpoint: "(max-width:991px)",},],"w-col-medium-8": [@@ -7770,6 +7992,7 @@ export const styles = {unit: "%",value: 66.6667,},+ breakpoint: "(max-width:991px)",},],"w-col-medium-9": [@@ -7781,6 +8004,7 @@ export const styles = {unit: "%",value: 75,},+ breakpoint: "(max-width:991px)",},],"w-col-medium-10": [@@ -7792,6 +8016,7 @@ export const styles = {unit: "%",value: 83.3333,},+ breakpoint: "(max-width:991px)",},],"w-col-medium-11": [@@ -7803,6 +8028,7 @@ export const styles = {unit: "%",value: 91.6667,},+ breakpoint: "(max-width:991px)",},],"w-col-medium-12": [@@ -7814,6 +8040,7 @@ export const styles = {unit: "%",value: 100,},+ breakpoint: "(max-width:991px)",},],"w-col-stack": [@@ -7825,6 +8052,7 @@ export const styles = {unit: "%",value: 100,},+ breakpoint: "(max-width:991px)",},{selector: "w-col-stack",@@ -7833,6 +8061,7 @@ export const styles = {type: "keyword",value: "auto",},+ breakpoint: "(max-width:991px)",},{selector: "w-col-stack",@@ -7841,9 +8070,19 @@ export const styles = {type: "keyword",value: "auto",},+ breakpoint: "(max-width:991px)",},],"w-hidden-small": [+ {+ selector: "w-hidden-small",+ property: "display",+ value: {+ type: "keyword",+ value: "none",+ },+ breakpoint: "(max-width:767px)",+ },{selector: "w-hidden-small",property: "display",@@ -7851,6 +8090,7 @@ export const styles = {type: "keyword",value: "inherit",},+ breakpoint: "(max-width:479px)",},],"w-col-small-1": [@@ -7862,6 +8102,7 @@ export const styles = {unit: "%",value: 8.33333,},+ breakpoint: "(max-width:767px)",},],"w-col-small-2": [@@ -7873,6 +8114,7 @@ export const styles = {unit: "%",value: 16.6667,},+ breakpoint: "(max-width:767px)",},],"w-col-small-3": [@@ -7884,6 +8126,7 @@ export const styles = {unit: "%",value: 25,},+ breakpoint: "(max-width:767px)",},],"w-col-small-4": [@@ -7895,6 +8138,7 @@ export const styles = {unit: "%",value: 33.3333,},+ breakpoint: "(max-width:767px)",},],"w-col-small-5": [@@ -7906,6 +8150,7 @@ export const styles = {unit: "%",value: 41.6667,},+ breakpoint: "(max-width:767px)",},],"w-col-small-6": [@@ -7917,6 +8162,7 @@ export const styles = {unit: "%",value: 50,},+ breakpoint: "(max-width:767px)",},],"w-col-small-7": [@@ -7928,6 +8174,7 @@ export const styles = {unit: "%",value: 58.3333,},+ breakpoint: "(max-width:767px)",},],"w-col-small-8": [@@ -7939,6 +8186,7 @@ export const styles = {unit: "%",value: 66.6667,},+ breakpoint: "(max-width:767px)",},],"w-col-small-9": [@@ -7950,6 +8198,7 @@ export const styles = {unit: "%",value: 75,},+ breakpoint: "(max-width:767px)",},],"w-col-small-10": [@@ -7961,6 +8210,7 @@ export const styles = {unit: "%",value: 83.3333,},+ breakpoint: "(max-width:767px)",},],"w-col-small-11": [@@ -7972,6 +8222,7 @@ export const styles = {unit: "%",value: 91.6667,},+ breakpoint: "(max-width:767px)",},],"w-col-small-12": [@@ -7983,6 +8234,7 @@ export const styles = {unit: "%",value: 100,},+ breakpoint: "(max-width:767px)",},],"w-hidden-tiny": [@@ -7993,6 +8245,7 @@ export const styles = {type: "keyword",value: "none",},+ breakpoint: "(max-width:479px)",},],"w-col-tiny-1": [@@ -8004,6 +8257,7 @@ export const styles = {unit: "%",value: 8.33333,},+ breakpoint: "(max-width:479px)",},],"w-col-tiny-2": [@@ -8015,6 +8269,7 @@ export const styles = {unit: "%",value: 16.6667,},+ breakpoint: "(max-width:479px)",},],"w-col-tiny-3": [@@ -8026,6 +8281,7 @@ export const styles = {unit: "%",value: 25,},+ breakpoint: "(max-width:479px)",},],"w-col-tiny-4": [@@ -8037,6 +8293,7 @@ export const styles = {unit: "%",value: 33.3333,},+ breakpoint: "(max-width:479px)",},],"w-col-tiny-5": [@@ -8048,6 +8305,7 @@ export const styles = {unit: "%",value: 41.6667,},+ breakpoint: "(max-width:479px)",},],"w-col-tiny-6": [@@ -8059,6 +8317,7 @@ export const styles = {unit: "%",value: 50,},+ breakpoint: "(max-width:479px)",},],"w-col-tiny-7": [@@ -8070,6 +8329,7 @@ export const styles = {unit: "%",value: 58.3333,},+ breakpoint: "(max-width:479px)",},],"w-col-tiny-8": [@@ -8081,6 +8341,7 @@ export const styles = {unit: "%",value: 66.6667,},+ breakpoint: "(max-width:479px)",},],"w-col-tiny-9": [@@ -8092,6 +8353,7 @@ export const styles = {unit: "%",value: 75,},+ breakpoint: "(max-width:479px)",},],"w-col-tiny-10": [@@ -8103,6 +8365,7 @@ export const styles = {unit: "%",value: 83.3333,},+ breakpoint: "(max-width:479px)",},],"w-col-tiny-11": [@@ -8114,6 +8377,7 @@ export const styles = {unit: "%",value: 91.6667,},+ breakpoint: "(max-width:479px)",},],"w-col-tiny-12": [@@ -8125,6 +8389,7 @@ export const styles = {unit: "%",value: 100,},+ breakpoint: "(max-width:479px)",},],"w-widget": [@@ -8511,258 +8776,144 @@ export const styles = {},{selector: "w-widget-twitter-count-shim",- property: "marginBottom",- value: {- type: "unit",- unit: "px",- value: 8,- },- },- {- selector: "w-widget-twitter-count-shim",- property: "content",- value: {- type: "unparsed",- value: '" "',- },- },- {- selector: "w-widget-twitter-count-shim",- property: "pointerEvents",- value: {- type: "keyword",- value: "none",- },- },- {- selector: "w-widget-twitter-count-shim",- property: "top",- value: {- type: "unit",- unit: "%",- value: 100,- },- },- {- selector: "w-widget-twitter-count-shim",- property: "left",- value: {- type: "unit",- unit: "%",- value: 50,- },- },- {- selector: "w-widget-twitter-count-shim",- property: "marginLeft",- value: {- type: "unit",- unit: "px",- value: -4,- },- },- ],- "w--large": [- {- selector: "w--large",- property: "width",- value: {- type: "unit",- unit: "px",- value: 76,- },- },- {- selector: "w--large",- property: "height",- value: {- type: "unit",- unit: "px",- value: 28,- },- },- {- selector: "w--large",property: "marginLeft",value: {type: "unit",unit: "px",value: -9,},+ state: ":not",},{- selector: "w--large",- property: "borderTopWidth",- value: {- type: "unit",- unit: "px",- value: 5,- },- },- {- selector: "w--large",- property: "borderRightWidth",- value: {- type: "unit",- unit: "px",- value: 5,- },- },- {- selector: "w--large",- property: "borderBottomWidth",- value: {- type: "unit",- unit: "px",- value: 5,- },- },- {- selector: "w--large",- property: "borderLeftWidth",- value: {- type: "unit",- unit: "px",- value: 5,- },- },- {- selector: "w--large",- property: "marginTop",- value: {- type: "unit",- unit: "px",- value: -5,- },- },- ],- "w--vertical": [- {- selector: "w--vertical",- property: "marginLeft",- value: {- type: "unit",- unit: "px",- value: -4,- },- },- {- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "marginRight",value: {type: "unit",unit: "px",value: 8,},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "content",value: {type: "unparsed",value: '" "',},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "pointerEvents",value: {type: "keyword",value: "none",},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "borderTopWidth",value: {type: "unit",unit: "px",- value: 4,+ value: 5,},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "borderRightWidth",value: {type: "unit",unit: "px",- value: 4,+ value: 5,},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "borderBottomWidth",value: {type: "unit",unit: "px",- value: 4,+ value: 5,},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "borderLeftWidth",value: {type: "unit",unit: "px",- value: 4,+ value: 5,},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "borderTopStyle",value: {type: "keyword",value: "solid",},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "borderRightStyle",value: {type: "keyword",value: "solid",},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "borderBottomStyle",value: {type: "keyword",value: "solid",},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "borderLeftStyle",value: {type: "keyword",value: "solid",},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "borderTopColor",value: {type: "rgb",- alpha: 1,+ alpha: 0,r: 255,g: 255,b: 255,},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "borderRightColor",value: {type: "rgb",- alpha: 0,+ alpha: 1,r: 255,g: 255,b: 255,},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "borderBottomColor",value: {type: "rgb",@@ -8771,9 +8922,10 @@ export const styles = {g: 255,b: 255,},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "borderLeftColor",value: {type: "rgb",@@ -8782,62 +8934,69 @@ export const styles = {g: 255,b: 255,},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "width",value: {type: "unit",- unit: "px",- value: 76,+ unit: "number",+ value: 0,},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "height",value: {type: "unit",unit: "number",value: 0,},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "position",value: {type: "keyword",value: "absolute",},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "top",value: {type: "unit",unit: "%",- value: 100,+ value: 50,},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "left",value: {type: "unit",- unit: "%",- value: 50,+ unit: "number",+ value: 0,},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "marginTop",value: {type: "unit",unit: "px",value: -5,},+ state: ":not",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "marginBottom",value: {type: "unit",@@ -8846,38 +9005,584 @@ export const styles = {},},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "content",value: {type: "unparsed",value: '" "',},- state: ":after",},{- selector: "w--vertical",+ selector: "w-widget-twitter-count-shim",property: "pointerEvents",value: {type: "keyword",value: "none",},- state: ":after",+ },+ {+ selector: "w-widget-twitter-count-shim",+ property: "top",+ value: {+ type: "unit",+ unit: "%",+ value: 100,+ },+ },+ {+ selector: "w-widget-twitter-count-shim",+ property: "left",+ value: {+ type: "unit",+ unit: "%",+ value: 50,+ },+ },+ {+ selector: "w-widget-twitter-count-shim",+ property: "marginLeft",+ value: {+ type: "unit",+ unit: "px",+ value: -4,+ },+ },+ ],+ "w--large": [+ {+ selector: "w--large",+ property: "width",+ value: {+ type: "unit",+ unit: "px",+ value: 76,+ },+ },+ {+ selector: "w--large",+ property: "height",+ value: {+ type: "unit",+ unit: "px",+ value: 28,+ },+ },+ {+ selector: "w--large",+ property: "marginLeft",+ value: {+ type: "unit",+ unit: "px",+ value: 6,+ },+ },+ {+ selector: "w--large",+ property: "borderTopWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 5,+ },+ state: ":before",+ },+ {+ selector: "w--large",+ property: "borderRightWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 5,+ },+ state: ":before",+ },+ {+ selector: "w--large",+ property: "borderBottomWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 5,+ },+ state: ":before",+ },+ {+ selector: "w--large",+ property: "borderLeftWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 5,+ },+ state: ":before",+ },+ {+ selector: "w--large",+ property: "marginTop",+ value: {+ type: "unit",+ unit: "px",+ value: -5,+ },+ state: ":before",+ },+ {+ selector: "w--large",+ property: "marginLeft",+ value: {+ type: "unit",+ unit: "px",+ value: -10,+ },+ state: ":before",+ },+ {+ selector: "w--large",+ property: "borderTopWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 5,+ },+ state: ":after",+ },+ {+ selector: "w--large",+ property: "borderRightWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 5,+ },+ state: ":after",+ },+ {+ selector: "w--large",+ property: "borderBottomWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 5,+ },+ state: ":after",+ },+ {+ selector: "w--large",+ property: "borderLeftWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 5,+ },+ state: ":after",+ },+ {+ selector: "w--large",+ property: "marginTop",+ value: {+ type: "unit",+ unit: "px",+ value: -5,+ },+ state: ":after",+ },+ {+ selector: "w--large",+ property: "marginLeft",+ value: {+ type: "unit",+ unit: "px",+ value: -9,+ },+ state: ":after",+ },+ ],+ "w--vertical": [+ {+ selector: "w--vertical",+ property: "marginLeft",+ value: {+ type: "unit",+ unit: "px",+ value: -9,+ },+ },+ {+ selector: "w--vertical",+ property: "marginRight",+ value: {+ type: "unit",+ unit: "px",+ value: 8,+ },+ },+ {+ selector: "w--vertical",+ property: "content",+ value: {+ type: "unparsed",+ value: '" "',+ },+ },+ {+ selector: "w--vertical",+ property: "pointerEvents",+ value: {+ type: "keyword",+ value: "none",+ },+ },+ {+ selector: "w--vertical",+ property: "borderTopWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 5,+ },+ },+ {+ selector: "w--vertical",+ property: "borderRightWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 5,+ },+ },+ {+ selector: "w--vertical",+ property: "borderBottomWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 5,+ },+ },+ {+ selector: "w--vertical",+ property: "borderLeftWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 5,+ },+ },+ {+ selector: "w--vertical",+ property: "borderTopStyle",+ value: {+ type: "keyword",+ value: "solid",+ },+ },+ {+ selector: "w--vertical",+ property: "borderRightStyle",+ value: {+ type: "keyword",+ value: "solid",+ },+ },+ {+ selector: "w--vertical",+ property: "borderBottomStyle",+ value: {+ type: "keyword",+ value: "solid",+ },+ },+ {+ selector: "w--vertical",+ property: "borderLeftStyle",+ value: {+ type: "keyword",+ value: "solid",+ },+ },+ {+ selector: "w--vertical",+ property: "borderTopColor",+ value: {+ type: "rgb",+ alpha: 0,+ r: 255,+ g: 255,+ b: 255,+ },+ },+ {+ selector: "w--vertical",+ property: "borderRightColor",+ value: {+ type: "rgb",+ alpha: 1,+ r: 255,+ g: 255,+ b: 255,+ },+ },+ {+ selector: "w--vertical",+ property: "borderBottomColor",+ value: {+ type: "rgb",+ alpha: 0,+ r: 255,+ g: 255,+ b: 255,+ },+ },+ {+ selector: "w--vertical",+ property: "borderLeftColor",+ value: {+ type: "rgb",+ alpha: 0,+ r: 255,+ g: 255,+ b: 255,+ },+ },+ {+ selector: "w--vertical",+ property: "width",+ value: {+ type: "unit",+ unit: "px",+ value: 76,+ },+ },+ {+ selector: "w--vertical",+ property: "height",+ value: {+ type: "unit",+ unit: "px",+ value: 33,+ },+ },+ {+ selector: "w--vertical",+ property: "position",+ value: {+ type: "keyword",+ value: "absolute",+ },+ },+ {+ selector: "w--vertical",+ property: "top",+ value: {+ type: "unit",+ unit: "%",+ value: 50,+ },+ },+ {+ selector: "w--vertical",+ property: "left",+ value: {+ type: "unit",+ unit: "number",+ value: 0,+ },+ },+ {+ selector: "w--vertical",+ property: "marginTop",+ value: {+ type: "unit",+ unit: "px",+ value: -5,+ },+ },+ {+ selector: "w--vertical",+ property: "marginBottom",+ value: {+ type: "unit",+ unit: "px",+ value: 8,+ },+ },+ {+ selector: "w--vertical",+ property: "content",+ value: {+ type: "unparsed",+ value: '" "',+ },+ state: ":before",},{selector: "w--vertical",- property: "borderTopWidth",+ property: "content",+ value: {+ type: "unparsed",+ value: '" "',+ },+ state: ":after",+ },+ {+ selector: "w--vertical",+ property: "pointerEvents",value: {type: "keyword",- value: "medium",+ value: "none",+ },+ state: ":before",+ },+ {+ selector: "w--vertical",+ property: "pointerEvents",+ value: {+ type: "keyword",+ value: "none",},state: ":after",},+ {+ selector: "w--vertical",+ property: "borderTopWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 5,+ },+ state: ":before",+ },{selector: "w--vertical",property: "borderRightWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 5,+ },+ state: ":before",+ },+ {+ selector: "w--vertical",+ property: "borderBottomWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 5,+ },+ state: ":before",+ },+ {+ selector: "w--vertical",+ property: "borderLeftWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 5,+ },+ state: ":before",+ },+ {+ selector: "w--vertical",+ property: "borderTopStyle",value: {type: "keyword",- value: "medium",+ value: "solid",+ },+ state: ":before",+ },+ {+ selector: "w--vertical",+ property: "borderRightStyle",+ value: {+ type: "keyword",+ value: "solid",+ },+ state: ":before",+ },+ {+ selector: "w--vertical",+ property: "borderBottomStyle",+ value: {+ type: "keyword",+ value: "solid",+ },+ state: ":before",+ },+ {+ selector: "w--vertical",+ property: "borderLeftStyle",+ value: {+ type: "keyword",+ value: "solid",+ },+ state: ":before",+ },+ {+ selector: "w--vertical",+ property: "borderTopColor",+ value: {+ type: "rgb",+ alpha: 1,+ r: 93,+ g: 108,+ b: 123,+ },+ state: ":before",+ },+ {+ selector: "w--vertical",+ property: "borderRightColor",+ value: {+ type: "rgb",+ alpha: 0,+ r: 117,+ g: 134,+ b: 150,+ },+ state: ":before",+ },+ {+ selector: "w--vertical",+ property: "borderBottomColor",+ value: {+ type: "rgb",+ alpha: 0,+ r: 117,+ g: 134,+ b: 150,+ },+ state: ":before",+ },+ {+ selector: "w--vertical",+ property: "borderLeftColor",+ value: {+ type: "rgb",+ alpha: 0,+ r: 117,+ g: 134,+ b: 150,+ },+ state: ":before",+ },+ {+ selector: "w--vertical",+ property: "borderTopWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 4,+ },+ state: ":after",+ },+ {+ selector: "w--vertical",+ property: "borderRightWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 4,},state: ":after",},@@ -8885,8 +9590,9 @@ export const styles = {selector: "w--vertical",property: "borderBottomWidth",value: {- type: "keyword",- value: "medium",+ type: "unit",+ unit: "px",+ value: 4,},state: ":after",},@@ -8894,8 +9600,9 @@ export const styles = {selector: "w--vertical",property: "borderLeftWidth",value: {- type: "keyword",- value: "medium",+ type: "unit",+ unit: "px",+ value: 4,},state: ":after",},@@ -8940,10 +9647,10 @@ export const styles = {property: "borderTopColor",value: {type: "rgb",- alpha: 0,- r: 0,- g: 0,- b: 0,+ alpha: 1,+ r: 255,+ g: 255,+ b: 255,},state: ":after",},@@ -8953,9 +9660,9 @@ export const styles = {value: {type: "rgb",alpha: 0,- r: 0,- g: 0,- b: 0,+ r: 255,+ g: 255,+ b: 255,},state: ":after",},@@ -8965,9 +9672,9 @@ export const styles = {value: {type: "rgb",alpha: 0,- r: 0,- g: 0,- b: 0,+ r: 255,+ g: 255,+ b: 255,},state: ":after",},@@ -8977,9 +9684,9 @@ export const styles = {value: {type: "rgb",alpha: 0,- r: 0,- g: 0,- b: 0,+ r: 255,+ g: 255,+ b: 255,},state: ":after",},@@ -8991,44 +9698,113 @@ export const styles = {unit: "number",value: 0,},+ state: ":before",+ },+ {+ selector: "w--vertical",+ property: "width",+ value: {+ type: "unit",+ unit: "number",+ value: 0,+ },+ state: ":after",+ },+ {+ selector: "w--vertical",+ property: "height",+ value: {+ type: "unit",+ unit: "number",+ value: 0,+ },+ state: ":before",+ },+ {+ selector: "w--vertical",+ property: "height",+ value: {+ type: "unit",+ unit: "number",+ value: 0,+ },+ state: ":after",+ },+ {+ selector: "w--vertical",+ property: "position",+ value: {+ type: "keyword",+ value: "absolute",+ },+ state: ":before",+ },+ {+ selector: "w--vertical",+ property: "position",+ value: {+ type: "keyword",+ value: "absolute",+ },+ state: ":after",+ },+ {+ selector: "w--vertical",+ property: "top",+ value: {+ type: "unit",+ unit: "%",+ value: 100,+ },+ state: ":before",+ },+ {+ selector: "w--vertical",+ property: "top",+ value: {+ type: "unit",+ unit: "%",+ value: 100,+ },state: ":after",},{selector: "w--vertical",- property: "height",+ property: "left",value: {type: "unit",- unit: "number",- value: 0,+ unit: "%",+ value: 50,},- state: ":after",+ state: ":before",},{selector: "w--vertical",- property: "position",+ property: "left",value: {- type: "keyword",- value: "absolute",+ type: "unit",+ unit: "%",+ value: 50,},state: ":after",},{selector: "w--vertical",- property: "top",+ property: "marginLeft",value: {type: "unit",- unit: "%",- value: 100,+ unit: "px",+ value: -5,},- state: ":after",+ state: ":before",},{selector: "w--vertical",- property: "left",+ property: "marginLeft",value: {type: "unit",- unit: "%",- value: 50,+ unit: "px",+ value: -4,},state: ":after",},@@ -10372,6 +11148,7 @@ export const styles = {unit: "number",value: 0,},+ state: ":focus",},{selector: "w-slider-arrow-right",@@ -10380,6 +11157,7 @@ export const styles = {type: "keyword",value: "none",},+ state: ":focus",},{selector: "w-slider-arrow-right",@@ -10388,6 +11166,7 @@ export const styles = {type: "keyword",value: "currentColor",},+ state: ":focus",},{selector: "w-slider-arrow-right",@@ -11377,6 +12156,7 @@ export const styles = {unit: "px",value: 10,},+ breakpoint: "(max-width:767px)",},{selector: "w-nav-brand",@@ -11929,7 +12709,7 @@ export const styles = {value: {type: "unit",unit: "vh",- value: 96,+ value: 100,},},{@@ -11956,6 +12736,16 @@ export const styles = {value: "hidden",},},+ {+ selector: "w-lightbox-content",+ property: "height",+ value: {+ type: "unit",+ unit: "vh",+ value: 96,+ },+ breakpoint: "(min-width:768px)",+ },{selector: "w-lightbox-content",property: "marginTop",@@ -11964,6 +12754,7 @@ export const styles = {unit: "vh",value: 2,},+ breakpoint: "(min-width:768px)",},],"w-lightbox-view": [@@ -11991,7 +12782,7 @@ export const styles = {value: {type: "unit",unit: "vh",- value: 96,+ value: 100,},},{@@ -12017,7 +12808,7 @@ export const styles = {value: {type: "unit",unit: "vh",- value: 96,+ value: 100,},state: ":before",},@@ -12028,6 +12819,7 @@ export const styles = {type: "keyword",value: "middle",},+ state: ":before",},{selector: "w-lightbox-view",@@ -12036,9 +12828,40 @@ export const styles = {type: "keyword",value: "inline-block",},+ state: ":before",+ },+ {+ selector: "w-lightbox-view",+ property: "height",+ value: {+ type: "unit",+ unit: "vh",+ value: 96,+ },+ breakpoint: "(min-width:768px)",+ },+ {+ selector: "w-lightbox-view",+ property: "height",+ value: {+ type: "unit",+ unit: "vh",+ value: 96,+ },+ breakpoint: "(min-width:768px)",+ state: ":before",},],"w-lightbox-group": [+ {+ selector: "w-lightbox-group",+ property: "height",+ value: {+ type: "unit",+ unit: "vh",+ value: 86,+ },+ },{selector: "w-lightbox-group",property: "height",@@ -12047,6 +12870,7 @@ export const styles = {unit: "vh",value: 84,},+ breakpoint: "(min-width:768px)",},],"w-lightbox-frame": [@@ -12154,7 +12978,7 @@ export const styles = {value: {type: "unit",unit: "vw",- value: 96,+ value: 100,},},{@@ -12163,7 +12987,7 @@ export const styles = {value: {type: "unit",unit: "vh",- value: 96,+ value: 100,},},{@@ -12174,6 +12998,26 @@ export const styles = {value: "block",},},+ {+ selector: "w-lightbox-image",+ property: "maxWidth",+ value: {+ type: "unit",+ unit: "vw",+ value: 96,+ },+ breakpoint: "(min-width:768px)",+ },+ {+ selector: "w-lightbox-image",+ property: "maxHeight",+ value: {+ type: "unit",+ unit: "vh",+ value: 96,+ },+ breakpoint: "(min-width:768px)",+ },],"w-lightbox-caption": [{@@ -12649,6 +13493,7 @@ export const styles = {unit: "number",value: 1,},+ breakpoint: "(min-width:768px)",state: ":hover",},],@@ -12674,7 +13519,7 @@ export const styles = {property: "display",value: {type: "keyword",- value: "block",+ value: "none",},},{@@ -12703,6 +13548,16 @@ export const styles = {unit: "number",value: 0.5,},+ breakpoint: "(min-width:768px)",+ },+ {+ selector: "w-lightbox-left",+ property: "display",+ value: {+ type: "keyword",+ value: "block",+ },+ breakpoint: "(min-width:768px)",},],"w-lightbox-right": [@@ -12727,7 +13582,7 @@ export const styles = {property: "display",value: {type: "keyword",- value: "block",+ value: "none",},},{@@ -12756,6 +13611,16 @@ export const styles = {unit: "number",value: 0.5,},+ breakpoint: "(min-width:768px)",+ },+ {+ selector: "w-lightbox-right",+ property: "display",+ value: {+ type: "keyword",+ value: "block",+ },+ breakpoint: "(min-width:768px)",},],"w-lightbox-close": [@@ -12815,6 +13680,7 @@ export const styles = {unit: "number",value: 0.8,},+ breakpoint: "(min-width:768px)",},],"w-lightbox-strip": [@@ -13803,63 +14669,63 @@ export const styles = {},{selector: "w-richtext",- property: "gridRowStart",+ property: "gridColumnStart",value: {type: "unit",unit: "number",value: 1,},- state: ":after",+ state: ":before",},{selector: "w-richtext",- property: "gridColumnStart",+ property: "gridRowEnd",value: {type: "unit",unit: "number",- value: 1,+ value: 2,},state: ":before",},{selector: "w-richtext",- property: "gridColumnStart",+ property: "gridColumnEnd",value: {type: "unit",unit: "number",- value: 1,+ value: 2,},- state: ":after",+ state: ":before",},{selector: "w-richtext",- property: "gridRowEnd",+ property: "gridRowStart",value: {type: "unit",unit: "number",- value: 2,+ value: 1,},- state: ":before",+ state: ":after",},{selector: "w-richtext",- property: "gridRowEnd",+ property: "gridColumnStart",value: {type: "unit",unit: "number",- value: 2,+ value: 1,},state: ":after",},{selector: "w-richtext",- property: "gridColumnEnd",+ property: "gridRowEnd",value: {type: "unit",unit: "number",value: 2,},- state: ":before",+ state: ":after",},{selector: "w-richtext",@@ -14289,63 +15155,63 @@ export const styles = {},{selector: "w-nav",- property: "gridRowStart",+ property: "gridColumnStart",value: {type: "unit",unit: "number",value: 1,},- state: ":after",+ state: ":before",},{selector: "w-nav",- property: "gridColumnStart",+ property: "gridRowEnd",value: {type: "unit",unit: "number",- value: 1,+ value: 2,},state: ":before",},{selector: "w-nav",- property: "gridColumnStart",+ property: "gridColumnEnd",value: {type: "unit",unit: "number",- value: 1,+ value: 2,},- state: ":after",+ state: ":before",},{selector: "w-nav",- property: "gridRowEnd",+ property: "gridRowStart",value: {type: "unit",unit: "number",- value: 2,+ value: 1,},- state: ":before",+ state: ":after",},{selector: "w-nav",- property: "gridRowEnd",+ property: "gridColumnStart",value: {type: "unit",unit: "number",- value: 2,+ value: 1,},state: ":after",},{selector: "w-nav",- property: "gridColumnEnd",+ property: "gridRowEnd",value: {type: "unit",unit: "number",value: 2,},- state: ":before",+ state: ":after",},{selector: "w-nav",@@ -14425,6 +15291,33 @@ export const styles = {value: "block",},},+ {+ selector: "w-nav",+ property: "display",+ value: {+ type: "keyword",+ value: "block",+ },+ breakpoint: "(max-width:991px)",+ },+ {+ selector: "w-nav",+ property: "display",+ value: {+ type: "keyword",+ value: "block",+ },+ breakpoint: "(max-width:767px)",+ },+ {+ selector: "w-nav",+ property: "display",+ value: {+ type: "keyword",+ value: "block",+ },+ breakpoint: "(max-width:479px)",+ },],"w-nav-link": [{@@ -14881,63 +15774,63 @@ export const styles = {},{selector: "w-tabs",- property: "gridRowStart",+ property: "gridColumnStart",value: {type: "unit",unit: "number",value: 1,},- state: ":after",+ state: ":before",},{selector: "w-tabs",- property: "gridColumnStart",+ property: "gridRowEnd",value: {type: "unit",unit: "number",- value: 1,+ value: 2,},state: ":before",},{selector: "w-tabs",- property: "gridColumnStart",+ property: "gridColumnEnd",value: {type: "unit",unit: "number",- value: 1,+ value: 2,},- state: ":after",+ state: ":before",},{selector: "w-tabs",- property: "gridRowEnd",+ property: "gridRowStart",value: {type: "unit",unit: "number",- value: 2,+ value: 1,},- state: ":before",+ state: ":after",},{selector: "w-tabs",- property: "gridRowEnd",+ property: "gridColumnStart",value: {type: "unit",unit: "number",- value: 2,+ value: 1,},state: ":after",},{selector: "w-tabs",- property: "gridColumnEnd",+ property: "gridRowEnd",value: {type: "unit",unit: "number",value: 2,},- state: ":before",+ state: ":after",},{selector: "w-tabs",@@ -15099,7 +15992,7 @@ export const styles = {property: "display",value: {type: "keyword",- value: "block",+ value: "inline-block",},},{@@ -15138,6 +16031,15 @@ export const styles = {},state: ":focus",},+ {+ selector: "w-tab-link",+ property: "display",+ value: {+ type: "keyword",+ value: "block",+ },+ breakpoint: "(max-width:479px)",+ },],"w-tab-content": [{@@ -15306,8 +16208,9 @@ export const styles = {selector: "w-layout-blockcontainer",property: "maxWidth",value: {- type: "keyword",- value: "none",+ type: "unit",+ unit: "px",+ value: 940,},},{@@ -15334,6 +16237,25 @@ export const styles = {value: "block",},},+ {+ selector: "w-layout-blockcontainer",+ property: "maxWidth",+ value: {+ type: "unit",+ unit: "px",+ value: 728,+ },+ breakpoint: "(max-width:991px)",+ },+ {+ selector: "w-layout-blockcontainer",+ property: "maxWidth",+ value: {+ type: "keyword",+ value: "none",+ },+ breakpoint: "(max-width:767px)",+ },],"w-layout-layout": [{diff --git a/apps/builder/app/shared/copy-paste/plugin-webflow/plugin-webflow.test.tsx b/apps/builder/app/shared/copy-paste/plugin-webflow/plugin-webflow.test.tsxindex 3bae747ec9..8086b65e27 100644--- a/apps/builder/app/shared/copy-paste/plugin-webflow/plugin-webflow.test.tsx+++ b/apps/builder/app/shared/copy-paste/plugin-webflow/plugin-webflow.test.tsx@@ -549,13 +549,13 @@ test("BlockContainer", async () => {expect(toCss(fragment)).toMatchInlineSnapshot(`"@media all {w-layout-blockcontainer {- max-width: none;+ max-width: 940px;margin-left: auto;margin-right: auto;display: block}w-container {- max-width: none;+ max-width: 940px;margin-left: auto;margin-right: auto}@@ -576,6 +576,24 @@ test("BlockContainer", async () => {grid-column-end: 2;display: table}+ }+ @media all and (max-width: 991px) {+ w-layout-blockcontainer {+ max-width: 728px+ }+ w-container {+ max-width: 728px+ }+ }+ @media all and (max-width: 767px) {+ w-layout-blockcontainer {+ max-width: none+ }+ }+ @media all and (max-width: 479px) {+ w-container {+ max-width: none+ }}"`);});@@ -784,10 +802,6 @@ test("Columns", async () => {);expect(toCss(fragment)).toMatchInlineSnapshot(`"@media all {- w-row {- margin-left: 0;- margin-right: 0- }w-row:after {content: " ";grid-row-start: 1;@@ -811,10 +825,24 @@ test("Columns", async () => {min-height: 1px;padding-left: 10px;padding-right: 10px;- position: relative;+ position: relative+ }+ }+ @media all and (max-width: 767px) {+ w-row {+ margin-left: 0;+ margin-right: 0+ }+ w-col {+ width: 100%;left: auto;right: auto}+ }+ @media all and (max-width: 479px) {+ w-col {+ width: 100%+ }}"`);});@@ -1571,14 +1599,17 @@ test("Form", async () => {cursor: pointer;box-sizing: border-box;height: auto;- border: 0 none currentColor;margin: 0;padding: 0}+ input::-moz-focus-inner {+ border: 0 none currentColor;+ padding: 0+ }w-input {color: rgba(51, 51, 51, 1);vertical-align: middle;- background-color: rgba(255, 255, 255, 1);+ background-color: rgba(238, 238, 238, 1);width: 100%;height: auto;margin-bottom: 10px;@@ -1652,10 +1683,13 @@ test("FormButton", async () => {cursor: pointer;box-sizing: border-box;height: auto;- border: 0 none currentColor;margin: 0;padding: 0}+ input::-moz-focus-inner {+ border: 0 none currentColor;+ padding: 0+ }w-button {color: rgba(255, 255, 255, 1);line-height: inherit;@@ -1737,14 +1771,17 @@ test("FormTextInput", async () => {cursor: pointer;box-sizing: border-box;height: auto;- border: 0 none currentColor;margin: 0;padding: 0}+ input::-moz-focus-inner {+ border: 0 none currentColor;+ padding: 0+ }w-input {color: rgba(51, 51, 51, 1);vertical-align: middle;- background-color: rgba(255, 255, 255, 1);+ background-color: rgba(238, 238, 238, 1);width: 100%;height: auto;margin-bottom: 10px;@@ -1878,7 +1915,7 @@ test("FormTextarea", async () => {w-input {color: rgba(51, 51, 51, 1);vertical-align: middle;- background-color: rgba(255, 255, 255, 1);+ background-color: rgba(238, 238, 238, 1);width: 100%;height: auto;margin-bottom: 10px;@@ -2053,10 +2090,13 @@ test("FormCheckboxWrapper, FormCheckboxInput, FormInlineLabel", async () => {cursor: pointer;box-sizing: border-box;height: auto;- border: 0 none currentColor;margin: 0;padding: 0}+ input::-moz-focus-inner {+ border: 0 none currentColor;+ padding: 0+ }w-checkbox-input {float: left;margin-top: 4px;@@ -2175,10 +2215,13 @@ test("FormRadioWrapper, FormRadioInput, FormInlineLabel", async () => {cursor: pointer;box-sizing: border-box;height: auto;- border: 0 none currentColor;margin: 0;padding: 0}+ input::-moz-focus-inner {+ border: 0 none currentColor;+ padding: 0+ }w-radio-input {float: left;margin-top: 3px;diff --git a/apps/builder/app/shared/copy-paste/plugin-webflow/styles.ts b/apps/builder/app/shared/copy-paste/plugin-webflow/styles.tsindex e7836bd0e6..7b3c4b3a41 100644--- a/apps/builder/app/shared/copy-paste/plugin-webflow/styles.ts+++ b/apps/builder/app/shared/copy-paste/plugin-webflow/styles.ts@@ -7,15 +7,18 @@ import type {import type { WfAsset, WfElementNode, WfNode, WfStyle } from "./schema";import { nanoid } from "nanoid";import { $breakpoints } from "~/shared/nano-states";-import { parseCss, pseudoElements } from "@webstudio-is/css-data";-// @todo this should be moved-import type { EmbedTemplateStyleDecl } from "@webstudio-is/react-sdk";+import {+ parseCss,+ pseudoElements,+ type ParsedStyleDecl,+} from "@webstudio-is/css-data";import { kebabCase } from "change-case";import { equalMedia } from "@webstudio-is/css-engine";import { isBaseBreakpoint } from "~/shared/breakpoints";import type { Styles as WfStylePresets } from "./__generated__/style-presets";import { builderApi } from "~/shared/builder-api";import { url } from "css-tree";+import { mapGroupBy } from "~/shared/shim";const { toast } = builderApi;@@ -39,6 +42,15 @@ const wfBreakpoints = new Map<WfBreakpointName, WfBreakpoint>([["small", { maxWidth: 767 }],["tiny", { maxWidth: 479 }],]);+const wfBreakpointByMediaQuery = new Map<undefined | string, WfBreakpointName>([+ [undefined, "base"],+ ["(min-width:1920px)", "xxl"],+ ["(min-width:1440px)", "xl"],+ ["(min-width:1280px)", "large"],+ ["(max-width:991px)", "medium"],+ ["(max-width:767px)", "small"],+ ["(max-width:479px)", "tiny"],+]);const parseVariantName = (variant: string) => {let [breakpointName, state = ""] = variant.split("_");@@ -101,16 +113,13 @@ const replaceAtImages = (});};-type UnparsedVariants = Map<string, string | Array<EmbedTemplateStyleDecl>>;+type UnparsedVariants = Map<string, string | Array<ParsedStyleDecl>>;// Variants value can be wf styleLess string which is a styles block// or it can be an array of EmbedTemplateStyleDecl.// If its an array, convert it to ws style decl.const toParsedVariants = (variants: UnparsedVariants) => {- const parsedVariants = new Map<- WfBreakpointName,- Array<EmbedTemplateStyleDecl>- >();+ const parsedVariants = new Map<WfBreakpointName, Array<ParsedStyleDecl>>();for (const [variant, styles] of variants) {const { breakpointName, state } = parseVariantName(variant);if (typeof styles === "string") {@@ -363,9 +372,18 @@ export const addStyles = async (addNodeStyles({styleSourceId: await generateStyleSourceId(name),name,- variants: new Map([- ["base", stylePresets[name] as Array<EmbedTemplateStyleDecl>],- ]),+ variants: new Map(+ Array.from(+ mapGroupBy(+ stylePresets[name] as Array<ParsedStyleDecl>,+ (item) => item.breakpoint+ ),+ ([mediaQuery, value]) => [+ wfBreakpointByMediaQuery.get(mediaQuery) ?? "base",+ value,+ ]+ )+ ),instanceId,fragment,breakpointsByName,diff --git a/packages/css-data/src/parse-css.test.ts b/packages/css-data/src/parse-css.test.tsindex 58fdd32d30..531c65e77a 100644--- a/packages/css-data/src/parse-css.test.ts+++ b/packages/css-data/src/parse-css.test.ts@@ -1,5 +1,5 @@import { describe, expect, test } from "@jest/globals";-import { parseCss } from "./parse-css";+import { parseCss, parseMediaQuery } from "./parse-css";describe("Parse CSS", () => {test("longhand property name with keyword value", () => {@@ -484,3 +484,171 @@ test("parse incorrectly unprefixed tap-highlight-color", () => {},]);});++test("parse top level rules and media all as base query", () => {+ expect(+ parseCss(`+ a {+ color: red;+ }+ @media all {+ b {+ width: auto;+ }+ }+ `)+ ).toEqual([+ {+ selector: "a",+ property: "color",+ value: { type: "keyword", value: "red" },+ },+ {+ selector: "b",+ property: "width",+ value: { type: "keyword", value: "auto" },+ },+ ]);+});++test("parse media queries", () => {+ expect(+ parseCss(`+ @media ( max-width: 768px ) {+ a {+ color: red;+ }+ }+ @media (min-width: 768px) {+ a {+ color: green;+ }+ }+ `)+ ).toEqual([+ {+ breakpoint: `(max-width:768px)`,+ selector: "a",+ property: "color",+ value: { type: "keyword", value: "red" },+ },+ {+ breakpoint: `(min-width:768px)`,+ selector: "a",+ property: "color",+ value: { type: "keyword", value: "green" },+ },+ ]);+});++test("support only screen media type", () => {+ expect(+ parseCss(`+ @media all {+ a {+ color: yellow;+ }+ }+ @media all and ( min-width: 768px ) {+ a {+ color: red;+ }+ }+ @media screen and (min-width: 1024px) {+ a {+ color: green;+ }+ }+ @media print and (min-width: 1280px) {+ a {+ color: blue;+ }+ }+ `)+ ).toEqual([+ {+ selector: "a",+ property: "color",+ value: { type: "keyword", value: "yellow" },+ },+ {+ breakpoint: `(min-width:768px)`,+ selector: "a",+ property: "color",+ value: { type: "keyword", value: "red" },+ },+ {+ breakpoint: `(min-width:1024px)`,+ selector: "a",+ property: "color",+ value: { type: "keyword", value: "green" },+ },+ ]);+});++test("ignore unsupported media queries", () => {+ expect(+ parseCss(`+ a {+ color: red;+ }+ @media (min-width: 768px) and (max-width: 1024px) {+ b {+ color: green;+ }+ }+ @media (min-width: 768px) and (max-width: 1024px) {+ c {+ color: blue;+ }+ }+ @media (hover: hover) {+ d {+ color: yellow;+ }+ }+ @media (min-width: 40rem) {+ e {+ color: orange;+ }+ }+ `)+ ).toEqual([+ {+ selector: "a",+ property: "color",+ value: { type: "keyword", value: "red" },+ },+ ]);+});++test("ignore unsupported at rules", () => {+ expect(+ parseCss(`+ a {+ color: red;+ }+ @supports (display: grid) {+ b {+ color: green;+ }+ }+ `)+ ).toEqual([+ {+ selector: "a",+ property: "color",+ value: { type: "keyword", value: "red" },+ },+ ]);+});++test("parse media query", () => {+ expect(parseMediaQuery(`(min-width: 768px)`)).toEqual({+ minWidth: 768,+ });+ expect(parseMediaQuery(`(max-width: 768px)`)).toEqual({+ maxWidth: 768,+ });+ expect(parseMediaQuery(`(hover: hover)`)).toEqual(undefined);+});diff --git a/packages/css-data/src/parse-css.ts b/packages/css-data/src/parse-css.tsindex 9e5b13f6a0..69e867d230 100644--- a/packages/css-data/src/parse-css.ts+++ b/packages/css-data/src/parse-css.ts@@ -5,6 +5,7 @@ import { parseCssValue as parseCssValueLonghand } from "./parse-css-value";import { expandShorthands } from "./shorthands";export type ParsedStyleDecl = {+ breakpoint?: string;selector: string;state?: string;property: StyleProperty;@@ -54,8 +55,6 @@ const unprefixProperty = (property: string) => {return property.replace(prefixRegex, "");};-type Selector = string;-const parseCssValue = (property: string,value: string@@ -96,23 +95,82 @@ const cssTreeTryParse = (input: string) => {}};+type Selector = {+ name: string;+ state?: string;+};+export const parseCss = (css: string) => {const ast = cssTreeTryParse(css);- let selectors: Selector[] = [];- let states = new Map<Selector, Array<string | undefined>>();const styles = new Map<string, ParsedStyleDecl>();if (ast === undefined) {return [];}- csstree.walk(ast, (node, item) => {- if (node.type === "SelectorList") {- selectors = [];- states = new Map();+ csstree.walk(ast, function (node) {+ if (node.type !== "Declaration" || this.rule?.prelude.type === undefined) {+ return;+ }++ if (this.atrule && this.atrule.name !== "media") {+ return;}- if (node.type === "ClassSelector" || node.type === "TypeSelector") {+ const supportedMediaFeatures = ["min-width", "max-width"];+ const supportedUnits = ["px"];+ let breakpoint: undefined | string;+ let invalidBreakpoint = false;+ if (this.atrule?.prelude?.type === "AtrulePrelude") {+ csstree.walk(this.atrule.prelude, {+ enter: (node, item, list) => {+ if (node.type === "Identifier") {+ if (+ node.name === "screen" ||+ node.name === "all" ||+ node.name === "and"+ ) {+ list.remove(item);+ }+ // prevent saving print styles+ if (node.name === "print") {+ invalidBreakpoint = true;+ }+ }+ if (+ node.type === "MediaFeature" &&+ supportedMediaFeatures.includes(node.name) === false+ ) {+ invalidBreakpoint = true;+ }+ if (+ node.type === "Dimension" &&+ supportedUnits.includes(node.unit) === false+ ) {+ invalidBreakpoint = true;+ }+ },+ leave: (node) => {+ // complex media queries are not supported yet+ if (node.type === "MediaQuery" && node.children.size > 1) {+ invalidBreakpoint = true;+ }+ },+ });+ const generated = csstree.generate(this.atrule.prelude);+ if (generated) {+ breakpoint = generated;+ }+ }+ if (invalidBreakpoint) {+ return;+ }++ const selectors: Selector[] = [];+ csstree.walk(this.rule.prelude, (node, item) => {+ if (node.type !== "ClassSelector" && node.type !== "TypeSelector") {+ return;+ }// We don't support nesting yet.if ((item?.prev && item.prev.data.type === "Combinator") ||@@ -121,55 +179,83 @@ export const parseCss = (css: string) => {return;}- selectors.push(node.name);-- const statesArray = states.get(node.name) ?? [];- states.set(node.name, statesArray);if (item?.next && item.next.data.type === "PseudoElementSelector") {- statesArray.push(`::${item.next.data.name}`);+ selectors.push({+ name: node.name,+ state: `::${item.next.data.name}`,+ });} else if (item?.next && item.next.data.type === "PseudoClassSelector") {- statesArray.push(`:${item.next.data.name}`);+ selectors.push({+ name: node.name,+ state: `:${item.next.data.name}`,+ });} else {- statesArray.push(undefined);+ selectors.push({+ name: node.name,+ });}+ });- return;- }-- if (node.type === "Declaration") {- const stringValue = csstree.generate(node.value);+ const stringValue = csstree.generate(node.value);- const parsedCss = parseCssValue(- unprefixProperty(node.property),- stringValue- );+ const parsedCss = parseCssValue(+ unprefixProperty(node.property),+ stringValue+ );+ for (const { name: selector, state } of selectors) {for (const [property, value] of parsedCss) {- try {- selectors.forEach((selector, index) => {- const styleDecl: ParsedStyleDecl = {- selector,- property: normalizePropertyName(- unprefixProperty(property)- ) as StyleProperty,- value,- };-- const statesArray = states.get(selector) ?? [];- const state = statesArray[index] ?? "";- if (state) {- styleDecl.state = state;- }-- // deduplicate styles within selector and state by using map- styles.set(`${selector}:${state}:${property}`, styleDecl);- });- } catch (error) {- console.error("Bad CSS declaration", error, parsedCss);+ const styleDecl: ParsedStyleDecl = {+ selector,+ property: normalizePropertyName(+ unprefixProperty(property)+ ) as StyleProperty,+ value,+ };+ if (breakpoint) {+ styleDecl.breakpoint = breakpoint;}+ if (state) {+ styleDecl.state = state;+ }++ // deduplicate styles within selector and state by using map+ styles.set(`${breakpoint}:${selector}:${state}:${property}`, styleDecl);}}});return Array.from(styles.values());};++type ParsedBreakpoint = {+ minWidth?: number;+ maxWidth?: number;+};++export const parseMediaQuery = (+ mediaQuery: string+): undefined | ParsedBreakpoint => {+ const ast = csstree.parse(mediaQuery, { context: "mediaQuery" });+ let property: undefined | "minWidth" | "maxWidth";+ let value: undefined | number;+ csstree.walk(ast, (node) => {+ if (node.type === "MediaFeature") {+ if (node.name === "min-width") {+ property = "minWidth";+ }+ if (node.name === "max-width") {+ property = "maxWidth";+ }+ }+ if (node.type === "Dimension" && node.unit === "px") {+ value = Number(node.value);+ }+ });+ if (property === undefined || value === undefined) {+ return;+ }+ return {+ [property]: value,+ };+};