Skip to content

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.

perf: generate only preset styles used in the project (#2333)

Bogdan Chadkinada5d24193fd
diff --git a/fixtures/webstudio-custom-template/app/__generated__/index.css b/fixtures/webstudio-custom-template/app/__generated__/index.css
index c9f0f495fa..84cdaf002d 100644
--- a/fixtures/webstudio-custom-template/app/__generated__/index.css
+++ b/fixtures/webstudio-custom-template/app/__generated__/index.css
@@ -4,19 +4,6 @@ html {
min-height: 100%;
}
@media all {
- blockquote:where([data-ws-component="Blockquote"]) {
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 10px;
- margin-left: 0;
- padding-top: 10px;
- padding-bottom: 10px;
- padding-left: 20px;
- padding-right: 20px;
- border-left-width: 5px;
- border-left-style: solid;
- border-left-color: rgba(226, 226, 226, 1);
- }
body:where([data-ws-component="Body"]) {
margin-top: 0;
margin-right: 0;
@@ -33,147 +20,6 @@ html {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
- b:where([data-ws-component="Bold"]) {
- font-weight: 700;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- }
- div:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- address:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- article:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- aside:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- figure:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- footer:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- header:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- main:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- nav:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- section:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- button:where([data-ws-component="Button"]) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- text-transform: none;
- }
- input:where([data-ws-component="Checkbox"]) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0.5em;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- }
- code:where([data-ws-component="CodeText"]) {
- font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono",
- Menlo, monospace;
- font-size: 1em;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- display: block;
- white-space: pre-wrap;
- padding-left: 0.2em;
- padding-right: 0.2em;
- background-color: rgba(238, 238, 238, 1);
- }
- form:where([data-ws-component="Form"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- min-height: 20px;
- }
h1:where([data-ws-component="Heading"]) {
box-sizing: border-box;
border-top-width: 1px;
@@ -222,768 +68,6 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- img:where([data-ws-component="Image"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- max-width: 100%;
- display: block;
- }
- input:where([data-ws-component="Input"]) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- display: block;
- }
- i:where([data-ws-component="Italic"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- font-style: italic;
- }
- label:where([data-ws-component="Label"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- display: block;
- }
- a:where([data-ws-component="Link"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- min-height: 1em;
- display: inline-block;
- }
- ol:where([data-ws-component="List"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- margin-top: 0;
- margin-bottom: 10px;
- padding-left: 40px;
- }
- ul:where([data-ws-component="List"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- margin-top: 0;
- margin-bottom: 10px;
- padding-left: 40px;
- }
- li:where([data-ws-component="ListItem"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- p:where([data-ws-component="Paragraph"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- input:where([data-ws-component="RadioButton"]) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0.5em;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- }
- a:where([data-ws-component="RichTextLink"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- min-height: 1em;
- display: inline-block;
- }
- hr:where([data-ws-component="Separator"]) {
- height: 1px;
- color: inherit;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- background-color: gray;
- border-top-style: none;
- border-right-style: none;
- border-left-style: none;
- border-bottom-style: none;
- }
- span:where([data-ws-component="Span"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- sub:where([data-ws-component="Subscript"]) {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: baseline;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- bottom: -0.25em;
- }
- sup:where([data-ws-component="Superscript"]) {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: baseline;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- top: -0.5em;
- }
- div:where([data-ws-component="Text"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- min-height: 1em;
- }
- textarea:where([data-ws-component="Textarea"]) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- resize: none;
- display: block;
- }
- div:where([data-ws-component="Vimeo"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- button:where([data-ws-component="VimeoPlayButton"]) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- text-transform: none;
- }
- img:where([data-ws-component="VimeoPreviewImage"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- max-width: 100%;
- display: block;
- }
- div:where([data-ws-component="VimeoSpinner"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:Accordion"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:AccordionContent"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- h3:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:AccordionHeader"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- margin-top: 0px;
- margin-bottom: 0px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:AccordionItem"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- button:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:AccordionTrigger"]
- ) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 0px;
- border-right-width: 0px;
- border-bottom-width: 0px;
- border-left-width: 0px;
- text-transform: none;
- background-color: transparent;
- background-image: none;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-color: rgba(226, 232, 240, 1);
- border-right-color: rgba(226, 232, 240, 1);
- border-bottom-color: rgba(226, 232, 240, 1);
- border-left-color: rgba(226, 232, 240, 1);
- padding-left: 0px;
- padding-right: 0px;
- padding-top: 0px;
- padding-bottom: 0px;
- }
- button:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:Checkbox"]
- ) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 0px;
- border-right-width: 0px;
- border-bottom-width: 0px;
- border-left-width: 0px;
- text-transform: none;
- background-color: transparent;
- background-image: none;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-color: rgba(226, 232, 240, 1);
- border-right-color: rgba(226, 232, 240, 1);
- border-bottom-color: rgba(226, 232, 240, 1);
- border-left-color: rgba(226, 232, 240, 1);
- padding-left: 0px;
- padding-right: 0px;
- padding-top: 0px;
- padding-bottom: 0px;
- }
- span:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:CheckboxIndicator"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:Collapsible"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:CollapsibleContent"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- button:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:DialogClose"]
- ) {
- background-color: transparent;
- background-image: none;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-color: rgba(226, 232, 240, 1);
- border-right-color: rgba(226, 232, 240, 1);
- border-bottom-color: rgba(226, 232, 240, 1);
- border-left-color: rgba(226, 232, 240, 1);
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- padding-left: 0px;
- padding-right: 0px;
- padding-top: 0px;
- padding-bottom: 0px;
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- text-transform: none;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:DialogContent"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- p:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:DialogDescription"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:DialogOverlay"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- h2:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:DialogTitle"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- label:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:Label"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:NavigationMenu"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:NavigationMenuContent"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:NavigationMenuItem"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:NavigationMenuLink"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:NavigationMenuList"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:NavigationMenuTrigger"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:NavigationMenuViewport"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:PopoverContent"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:RadioGroup"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- span:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:RadioGroupIndicator"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- button:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:RadioGroupItem"]
- ) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 0px;
- border-right-width: 0px;
- border-bottom-width: 0px;
- border-left-width: 0px;
- text-transform: none;
- background-color: transparent;
- background-image: none;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-color: rgba(226, 232, 240, 1);
- border-right-color: rgba(226, 232, 240, 1);
- border-bottom-color: rgba(226, 232, 240, 1);
- border-left-color: rgba(226, 232, 240, 1);
- padding-left: 0px;
- padding-right: 0px;
- padding-top: 0px;
- padding-bottom: 0px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:SelectContent"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:SelectItem"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- span:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:SelectItemIndicator"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- span:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:SelectItemText"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- button:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:SelectTrigger"]
- ) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- text-transform: none;
- }
- span:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:SelectValue"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:SelectViewport"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- button:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:Switch"]
- ) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 0px;
- border-right-width: 0px;
- border-bottom-width: 0px;
- border-left-width: 0px;
- text-transform: none;
- background-color: transparent;
- background-image: none;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-color: rgba(226, 232, 240, 1);
- border-right-color: rgba(226, 232, 240, 1);
- border-bottom-color: rgba(226, 232, 240, 1);
- border-left-color: rgba(226, 232, 240, 1);
- padding-left: 0px;
- padding-right: 0px;
- padding-top: 0px;
- padding-bottom: 0px;
- }
- span:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:SwitchThumb"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:Tabs"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:TabsContent"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:TabsList"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- button:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:TabsTrigger"]
- ) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 0px;
- border-right-width: 0px;
- border-bottom-width: 0px;
- border-left-width: 0px;
- text-transform: none;
- background-color: transparent;
- background-image: none;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-color: rgba(226, 232, 240, 1);
- border-right-color: rgba(226, 232, 240, 1);
- border-bottom-color: rgba(226, 232, 240, 1);
- border-left-color: rgba(226, 232, 240, 1);
- padding-left: 0px;
- padding-right: 0px;
- padding-top: 0px;
- padding-bottom: 0px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:TooltipContent"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
}
@media all {
[data-ws-id="7pwqBSgrfuuOfk1JblWcL"] {
diff --git a/fixtures/webstudio-remix-vercel/app/__generated__/index.css b/fixtures/webstudio-remix-vercel/app/__generated__/index.css
index 353d71e5e9..50220655b7 100644
--- a/fixtures/webstudio-remix-vercel/app/__generated__/index.css
+++ b/fixtures/webstudio-remix-vercel/app/__generated__/index.css
@@ -4,578 +4,23 @@ html {
min-height: 100%;
}
@media all {
- blockquote:where([data-ws-component="Blockquote"]) {
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 10px;
- margin-left: 0;
- padding-top: 10px;
- padding-bottom: 10px;
- padding-left: 20px;
- padding-right: 20px;
- border-left-width: 5px;
- border-left-style: solid;
- border-left-color: rgba(226, 226, 226, 1);
- }
- body:where([data-ws-component="Body"]) {
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- font-family: Arial, Roboto, sans-serif;
- font-size: 16px;
- line-height: 1.2;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- }
- b:where([data-ws-component="Bold"]) {
- font-weight: 700;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- }
- div:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- address:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- article:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- aside:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- figure:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- footer:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- header:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- main:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- nav:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- section:where([data-ws-component="Box"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- button:where([data-ws-component="Button"]) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- text-transform: none;
- }
- input:where([data-ws-component="Checkbox"]) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0.5em;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- }
- code:where([data-ws-component="CodeText"]) {
- font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono",
- Menlo, monospace;
- font-size: 1em;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- display: block;
- white-space: pre-wrap;
- padding-left: 0.2em;
- padding-right: 0.2em;
- background-color: rgba(238, 238, 238, 1);
- }
- form:where([data-ws-component="Form"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- min-height: 20px;
- }
- h1:where([data-ws-component="Heading"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- h2:where([data-ws-component="Heading"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- h3:where([data-ws-component="Heading"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- h4:where([data-ws-component="Heading"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- h5:where([data-ws-component="Heading"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- h6:where([data-ws-component="Heading"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- img:where([data-ws-component="Image"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- max-width: 100%;
- display: block;
- }
- input:where([data-ws-component="Input"]) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- display: block;
- }
- i:where([data-ws-component="Italic"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- font-style: italic;
- }
- label:where([data-ws-component="Label"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- display: block;
- }
- a:where([data-ws-component="Link"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- min-height: 1em;
- display: inline-block;
- }
- ol:where([data-ws-component="List"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- margin-top: 0;
- margin-bottom: 10px;
- padding-left: 40px;
- }
- ul:where([data-ws-component="List"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- margin-top: 0;
- margin-bottom: 10px;
- padding-left: 40px;
- }
- li:where([data-ws-component="ListItem"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- p:where([data-ws-component="Paragraph"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- input:where([data-ws-component="RadioButton"]) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0.5em;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- }
- a:where([data-ws-component="RichTextLink"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- min-height: 1em;
- display: inline-block;
- }
- hr:where([data-ws-component="Separator"]) {
- height: 1px;
- color: inherit;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- background-color: gray;
- border-top-style: none;
- border-right-style: none;
- border-left-style: none;
- border-bottom-style: none;
- }
- span:where([data-ws-component="Span"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- sub:where([data-ws-component="Subscript"]) {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: baseline;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- bottom: -0.25em;
- }
- sup:where([data-ws-component="Superscript"]) {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: baseline;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- top: -0.5em;
- }
- div:where([data-ws-component="Text"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- min-height: 1em;
- }
- textarea:where([data-ws-component="Textarea"]) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- resize: none;
- display: block;
- }
- div:where([data-ws-component="Vimeo"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- button:where([data-ws-component="VimeoPlayButton"]) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- text-transform: none;
- }
- img:where([data-ws-component="VimeoPreviewImage"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- max-width: 100%;
- display: block;
- }
- div:where([data-ws-component="VimeoSpinner"]) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:Accordion"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:AccordionContent"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- h3:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:AccordionHeader"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- margin-top: 0px;
- margin-bottom: 0px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:AccordionItem"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- button:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:AccordionTrigger"]
- ) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 0px;
- border-right-width: 0px;
- border-bottom-width: 0px;
- border-left-width: 0px;
- text-transform: none;
- background-color: transparent;
- background-image: none;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-color: rgba(226, 232, 240, 1);
- border-right-color: rgba(226, 232, 240, 1);
- border-bottom-color: rgba(226, 232, 240, 1);
- border-left-color: rgba(226, 232, 240, 1);
- padding-left: 0px;
- padding-right: 0px;
- padding-top: 0px;
- padding-bottom: 0px;
- }
- button:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:Checkbox"]
- ) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
+ body:where([data-ws-component="Body"]) {
margin-top: 0;
margin-right: 0;
margin-bottom: 0;
margin-left: 0;
- box-sizing: border-box;
- border-top-width: 0px;
- border-right-width: 0px;
- border-bottom-width: 0px;
- border-left-width: 0px;
- text-transform: none;
- background-color: transparent;
- background-image: none;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-color: rgba(226, 232, 240, 1);
- border-right-color: rgba(226, 232, 240, 1);
- border-bottom-color: rgba(226, 232, 240, 1);
- border-left-color: rgba(226, 232, 240, 1);
- padding-left: 0px;
- padding-right: 0px;
- padding-top: 0px;
- padding-bottom: 0px;
- }
- span:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:CheckboxIndicator"]
- ) {
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- outline-width: 1px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:Collapsible"]
- ) {
+ font-family: Arial, Roboto, sans-serif;
+ font-size: 16px;
+ line-height: 1.2;
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
- outline-width: 1px;
+ -webkit-font-smoothing: antialiased;
+ -moz-osx-font-smoothing: grayscale;
}
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:CollapsibleContent"]
- ) {
+ h1:where([data-ws-component="Heading"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -583,40 +28,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- button:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:DialogClose"]
- ) {
- background-color: transparent;
- background-image: none;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-color: rgba(226, 232, 240, 1);
- border-right-color: rgba(226, 232, 240, 1);
- border-bottom-color: rgba(226, 232, 240, 1);
- border-left-color: rgba(226, 232, 240, 1);
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- padding-left: 0px;
- padding-right: 0px;
- padding-top: 0px;
- padding-bottom: 0px;
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- text-transform: none;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:DialogContent"]
- ) {
+ h2:where([data-ws-component="Heading"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -624,9 +36,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- p:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:DialogDescription"]
- ) {
+ h3:where([data-ws-component="Heading"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -634,9 +44,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:DialogOverlay"]
- ) {
+ h4:where([data-ws-component="Heading"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -644,9 +52,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h2:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:DialogTitle"]
- ) {
+ h5:where([data-ws-component="Heading"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -654,9 +60,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- label:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:Label"]
- ) {
+ h6:where([data-ws-component="Heading"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -664,9 +68,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:NavigationMenu"]
- ) {
+ div:where([data-ws-component="Box"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -674,9 +76,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:NavigationMenuContent"]
- ) {
+ address:where([data-ws-component="Box"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -684,9 +84,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:NavigationMenuItem"]
- ) {
+ article:where([data-ws-component="Box"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -694,9 +92,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:NavigationMenuLink"]
- ) {
+ aside:where([data-ws-component="Box"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -704,9 +100,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:NavigationMenuList"]
- ) {
+ figure:where([data-ws-component="Box"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -714,9 +108,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:NavigationMenuTrigger"]
- ) {
+ footer:where([data-ws-component="Box"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -724,9 +116,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:NavigationMenuViewport"]
- ) {
+ header:where([data-ws-component="Box"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -734,9 +124,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:PopoverContent"]
- ) {
+ main:where([data-ws-component="Box"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -744,9 +132,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:RadioGroup"]
- ) {
+ nav:where([data-ws-component="Box"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -754,9 +140,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- span:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:RadioGroupIndicator"]
- ) {
+ section:where([data-ws-component="Box"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -764,40 +148,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- button:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:RadioGroupItem"]
- ) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 0px;
- border-right-width: 0px;
- border-bottom-width: 0px;
- border-left-width: 0px;
- text-transform: none;
- background-color: transparent;
- background-image: none;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-color: rgba(226, 232, 240, 1);
- border-right-color: rgba(226, 232, 240, 1);
- border-bottom-color: rgba(226, 232, 240, 1);
- border-left-color: rgba(226, 232, 240, 1);
- padding-left: 0px;
- padding-right: 0px;
- padding-top: 0px;
- padding-bottom: 0px;
- }
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:SelectContent"]
- ) {
+ p:where([data-ws-component="Paragraph"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -805,28 +156,28 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:SelectItem"]
- ) {
+ img:where([data-ws-component="Image"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
outline-width: 1px;
+ max-width: 100%;
+ display: block;
}
- span:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:SelectItemIndicator"]
- ) {
+ a:where([data-ws-component="Link"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
outline-width: 1px;
+ min-height: 1em;
+ display: inline-block;
}
- span:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:SelectItemText"]
+ div:where(
+ [data-ws-component="@webstudio-is/sdk-components-react-radix:Accordion"]
) {
box-sizing: border-box;
border-top-width: 1px;
@@ -835,25 +186,8 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- button:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:SelectTrigger"]
- ) {
- font-family: inherit;
- font-size: 100%;
- line-height: 1.15;
- margin-top: 0;
- margin-right: 0;
- margin-bottom: 0;
- margin-left: 0;
- box-sizing: border-box;
- border-top-width: 1px;
- border-right-width: 1px;
- border-bottom-width: 1px;
- border-left-width: 1px;
- text-transform: none;
- }
- span:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:SelectValue"]
+ div:where(
+ [data-ws-component="@webstudio-is/sdk-components-react-radix:AccordionItem"]
) {
box-sizing: border-box;
border-top-width: 1px;
@@ -862,8 +196,8 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:SelectViewport"]
+ h3:where(
+ [data-ws-component="@webstudio-is/sdk-components-react-radix:AccordionHeader"]
) {
box-sizing: border-box;
border-top-width: 1px;
@@ -871,9 +205,11 @@ html {
border-bottom-width: 1px;
border-left-width: 1px;
outline-width: 1px;
+ margin-top: 0px;
+ margin-bottom: 0px;
}
button:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:Switch"]
+ [data-ws-component="@webstudio-is/sdk-components-react-radix:AccordionTrigger"]
) {
font-family: inherit;
font-size: 100%;
@@ -903,18 +239,17 @@ html {
padding-top: 0px;
padding-bottom: 0px;
}
- span:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:SwitchThumb"]
- ) {
+ div:where([data-ws-component="Text"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
outline-width: 1px;
+ min-height: 1em;
}
div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:Tabs"]
+ [data-ws-component="@webstudio-is/sdk-components-react-radix:AccordionContent"]
) {
box-sizing: border-box;
border-top-width: 1px;
@@ -923,29 +258,25 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:TabsContent"]
- ) {
+ form:where([data-ws-component="Form"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
outline-width: 1px;
+ min-height: 20px;
}
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:TabsList"]
- ) {
+ label:where([data-ws-component="Label"]) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
outline-width: 1px;
+ display: block;
}
- button:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:TabsTrigger"]
- ) {
+ input:where([data-ws-component="Input"]) {
font-family: inherit;
font-size: 100%;
line-height: 1.15;
@@ -954,35 +285,26 @@ html {
margin-bottom: 0;
margin-left: 0;
box-sizing: border-box;
- border-top-width: 0px;
- border-right-width: 0px;
- border-bottom-width: 0px;
- border-left-width: 0px;
- text-transform: none;
- background-color: transparent;
- background-image: none;
- border-top-style: solid;
- border-right-style: solid;
- border-bottom-style: solid;
- border-left-style: solid;
- border-top-color: rgba(226, 232, 240, 1);
- border-right-color: rgba(226, 232, 240, 1);
- border-bottom-color: rgba(226, 232, 240, 1);
- border-left-color: rgba(226, 232, 240, 1);
- padding-left: 0px;
- padding-right: 0px;
- padding-top: 0px;
- padding-bottom: 0px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ display: block;
}
- div:where(
- [data-ws-component="@webstudio-is/sdk-components-react-radix:TooltipContent"]
- ) {
+ button:where([data-ws-component="Button"]) {
+ font-family: inherit;
+ font-size: 100%;
+ line-height: 1.15;
+ margin-top: 0;
+ margin-right: 0;
+ margin-bottom: 0;
+ margin-left: 0;
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
border-bottom-width: 1px;
border-left-width: 1px;
- outline-width: 1px;
+ text-transform: none;
}
}
@media all {
diff --git a/packages/cli/src/prebuild.ts b/packages/cli/src/prebuild.ts
index 5cb6ece6bb..9a8135d32e 100644
--- a/packages/cli/src/prebuild.ts
+++ b/packages/cli/src/prebuild.ts
@@ -222,6 +222,30 @@ export const prebuild = async (options: {
routes: [],
};
+ const radixComponentNamespacedMetas = Object.entries(
+ radixComponentMetas
+ ).reduce(
+ (r, [name, meta]) => {
+ const namespace = "@webstudio-is/sdk-components-react-radix";
+ r[`${namespace}:${name}`] = namespaceMeta(
+ meta,
+ namespace,
+ new Set(Object.keys(radixComponentMetas))
+ );
+ return r;
+ },
+ {} as Record<string, WsComponentMeta>
+ );
+
+ const metas = new Map(
+ Object.entries({
+ ...baseComponentMetas,
+ ...radixComponentNamespacedMetas,
+ ...remixComponentMetas,
+ })
+ );
+
+ const projectMetas = new Map<Instance["component"], WsComponentMeta>();
const componentsByPage: ComponentsByPage = {};
const siteDataByPage: SiteDataByPage = {};
@@ -276,33 +300,14 @@ export const prebuild = async (options: {
for (const [_instanceId, instance] of instances) {
if (instance.component) {
componentsByPage[path].add(instance.component);
+ const meta = metas.get(instance.component);
+ if (meta) {
+ projectMetas.set(instance.component, meta);
+ }
}
}
}
- const radixComponentNamespacedMetas = Object.entries(
- radixComponentMetas
- ).reduce(
- (r, [name, meta]) => {
- const namespace = "@webstudio-is/sdk-components-react-radix";
- r[`${namespace}:${name}`] = namespaceMeta(
- meta,
- namespace,
- new Set(Object.keys(radixComponentMetas))
- );
- return r;
- },
- {} as Record<string, WsComponentMeta>
- );
-
- const componentMetas = new Map(
- Object.entries({
- ...baseComponentMetas,
- ...radixComponentNamespacedMetas,
- ...remixComponentMetas,
- })
- );
-
const assetsToDownload: Promise<void>[] = [];
const fontAssets: FontAsset[] = [];
@@ -440,7 +445,7 @@ export const prebuild = async (options: {
const utilsExport = generateUtilsExport({
page: pageData.page,
- metas: componentMetas,
+ metas: projectMetas,
instances: new Map(pageData.build.instances),
props: new Map(pageData.build.props),
dataSources: new Map(pageData.build.dataSources),
@@ -499,7 +504,8 @@ ${utilsExport}
breakpoints: siteData.build?.breakpoints,
styles: siteData.build?.styles,
styleSourceSelections: siteData.build?.styleSourceSelections,
- componentMetas,
+ // pass only used metas to not generate unused preset styles
+ componentMetas: projectMetas,
},
{
assetBaseUrl,