diff --git a/apps/builder/app/canvas/shared/styles.ts b/apps/builder/app/canvas/shared/styles.ts
index ebada94686..f8399a6205 100644
--- a/apps/builder/app/canvas/shared/styles.ts
+++ b/apps/builder/app/canvas/shared/styles.ts
@@ -11,7 +11,6 @@ import {
collapsedAttribute,
idAttribute,
addGlobalRules,
- addPresetRules,
createImageValueTransformer,
descendantComponent,
type Params,
@@ -324,7 +323,22 @@ export const GlobalStyles = ({ params }: { params: Params }) => {
useLayoutEffect(() => {
presetSheet.clear();
- addPresetRules(presetSheet, metas);
+ presetSheet.addMediaRule("presets");
+ for (const [component, meta] of metas) {
+ for (const [tag, styles] of Object.entries(meta.presetStyle ?? {})) {
+ const rule = presetSheet.addNestingRule(
+ `${tag}:where([data-ws-component="${component}"])`
+ );
+ for (const declaration of styles) {
+ rule.setDeclaration({
+ breakpoint: "presets",
+ selector: declaration.state ?? "",
+ property: declaration.property,
+ value: declaration.value,
+ });
+ }
+ }
+ }
presetSheet.render();
}, [metas]);
diff --git a/fixtures/ssg/app/__generated__/[another-page]._index.tsx b/fixtures/ssg/app/__generated__/[another-page]._index.tsx
index 4d1098fe8e..dc400d12f4 100644
--- a/fixtures/ssg/app/__generated__/[another-page]._index.tsx
+++ b/fixtures/ssg/app/__generated__/[another-page]._index.tsx
@@ -20,8 +20,16 @@ export const pageBackgroundImageAssets: ImageAsset[] = [];
const Page = ({}: { system: any }) => {
return (
-
-
+
+
{"Another page"}
diff --git a/fixtures/ssg/app/__generated__/_index.tsx b/fixtures/ssg/app/__generated__/_index.tsx
index 914abbcb0f..1f0a3395d2 100644
--- a/fixtures/ssg/app/__generated__/_index.tsx
+++ b/fixtures/ssg/app/__generated__/_index.tsx
@@ -29,15 +29,19 @@ const Page = ({}: { system: any }) => {
-
+
{"Simple Project to test CLI"}
{"Please don't change directly in the fixture"}
@@ -45,6 +49,7 @@ const Page = ({}: { system: any }) => {
data-ws-id="pjkZo5EiBqaeUXBcyHf_O"
data-ws-component="Link"
href={"/another-page"}
+ className="w-link"
>
{"Test another page link"}
diff --git a/fixtures/ssg/app/__generated__/index.css b/fixtures/ssg/app/__generated__/index.css
index 2370a7e646..bc9e936306 100644
--- a/fixtures/ssg/app/__generated__/index.css
+++ b/fixtures/ssg/app/__generated__/index.css
@@ -4,7 +4,7 @@ html {
min-height: 100%;
}
@media all {
- body:where([data-ws-component="Body"]) {
+ :where(body.w-body) {
font-family: Arial, Roboto, sans-serif;
font-size: 16px;
line-height: 1.2;
@@ -17,7 +17,7 @@ html {
-moz-osx-font-smoothing: grayscale;
margin: 0;
}
- h1:where([data-ws-component="Heading"]) {
+ :where(h1.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -25,7 +25,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h2:where([data-ws-component="Heading"]) {
+ :where(h2.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -33,7 +33,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h3:where([data-ws-component="Heading"]) {
+ :where(h3.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -41,7 +41,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h4:where([data-ws-component="Heading"]) {
+ :where(h4.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -49,7 +49,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h5:where([data-ws-component="Heading"]) {
+ :where(h5.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -57,7 +57,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h6:where([data-ws-component="Heading"]) {
+ :where(h6.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -65,7 +65,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where([data-ws-component="Text"]) {
+ :where(div.w-text) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -74,7 +74,7 @@ html {
outline-width: 1px;
min-height: 1em;
}
- a:where([data-ws-component="Link"]) {
+ :where(a.w-link) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
diff --git a/fixtures/webstudio-cloudflare-template/app/__generated__/[another-page]._index.tsx b/fixtures/webstudio-cloudflare-template/app/__generated__/[another-page]._index.tsx
index 7cf0971d61..d8c98243d2 100644
--- a/fixtures/webstudio-cloudflare-template/app/__generated__/[another-page]._index.tsx
+++ b/fixtures/webstudio-cloudflare-template/app/__generated__/[another-page]._index.tsx
@@ -18,8 +18,16 @@ export const pageBackgroundImageAssets: ImageAsset[] = [];
const Page = ({}: { system: any }) => {
return (
-
-
+
+
{"Another page"}
diff --git a/fixtures/webstudio-cloudflare-template/app/__generated__/_index.tsx b/fixtures/webstudio-cloudflare-template/app/__generated__/_index.tsx
index 3ceab9547b..b3f8b2e3ea 100644
--- a/fixtures/webstudio-cloudflare-template/app/__generated__/_index.tsx
+++ b/fixtures/webstudio-cloudflare-template/app/__generated__/_index.tsx
@@ -31,15 +31,19 @@ const Page = ({}: { system: any }) => {
-
+
{"Simple Project to test CLI"}
{"Please don't change directly in the fixture"}
@@ -47,6 +51,7 @@ const Page = ({}: { system: any }) => {
data-ws-id="pjkZo5EiBqaeUXBcyHf_O"
data-ws-component="Link"
href={"/another-page"}
+ className="w-link"
>
{"Test another page link"}
diff --git a/fixtures/webstudio-cloudflare-template/app/__generated__/index.css b/fixtures/webstudio-cloudflare-template/app/__generated__/index.css
index 2370a7e646..bc9e936306 100644
--- a/fixtures/webstudio-cloudflare-template/app/__generated__/index.css
+++ b/fixtures/webstudio-cloudflare-template/app/__generated__/index.css
@@ -4,7 +4,7 @@ html {
min-height: 100%;
}
@media all {
- body:where([data-ws-component="Body"]) {
+ :where(body.w-body) {
font-family: Arial, Roboto, sans-serif;
font-size: 16px;
line-height: 1.2;
@@ -17,7 +17,7 @@ html {
-moz-osx-font-smoothing: grayscale;
margin: 0;
}
- h1:where([data-ws-component="Heading"]) {
+ :where(h1.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -25,7 +25,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h2:where([data-ws-component="Heading"]) {
+ :where(h2.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -33,7 +33,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h3:where([data-ws-component="Heading"]) {
+ :where(h3.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -41,7 +41,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h4:where([data-ws-component="Heading"]) {
+ :where(h4.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -49,7 +49,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h5:where([data-ws-component="Heading"]) {
+ :where(h5.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -57,7 +57,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h6:where([data-ws-component="Heading"]) {
+ :where(h6.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -65,7 +65,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where([data-ws-component="Text"]) {
+ :where(div.w-text) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -74,7 +74,7 @@ html {
outline-width: 1px;
min-height: 1em;
}
- a:where([data-ws-component="Link"]) {
+ :where(a.w-link) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
diff --git a/fixtures/webstudio-custom-template/app/__generated__/[script-test]._index.tsx b/fixtures/webstudio-custom-template/app/__generated__/[script-test]._index.tsx
index f9ba511f01..b6af7a2126 100644
--- a/fixtures/webstudio-custom-template/app/__generated__/[script-test]._index.tsx
+++ b/fixtures/webstudio-custom-template/app/__generated__/[script-test]._index.tsx
@@ -37,15 +37,20 @@ const Page = ({}: { system: any }) => {
-
+
{"Script Test"}
{"Go Home"}
@@ -55,6 +60,7 @@ const Page = ({}: { system: any }) => {
code={
"
\n\n\nSCRIPTS ARE HERE 2
"
}
+ className="w-html-embed"
/>
{
"\n\nSCRIPTS ARE HERE
"
}
clientOnly={true}
+ className="w-html-embed"
/>
);
diff --git a/fixtures/webstudio-custom-template/app/__generated__/[sitemap.xml]._index.tsx b/fixtures/webstudio-custom-template/app/__generated__/[sitemap.xml]._index.tsx
index c372f7c724..3d2aa3d7d3 100644
--- a/fixtures/webstudio-custom-template/app/__generated__/[sitemap.xml]._index.tsx
+++ b/fixtures/webstudio-custom-template/app/__generated__/[sitemap.xml]._index.tsx
@@ -30,7 +30,11 @@ const Body = (props: any) => props.children;
const Page = ({ system: system }: { system: any }) => {
let sitemapxml = useResource("sitemapxml_1");
return (
-
+
{
return (
-
-
+
+
{"Привет Мир"}
diff --git a/fixtures/webstudio-custom-template/app/__generated__/_index.tsx b/fixtures/webstudio-custom-template/app/__generated__/_index.tsx
index d2b66726a4..c43aaff9d2 100644
--- a/fixtures/webstudio-custom-template/app/__generated__/_index.tsx
+++ b/fixtures/webstudio-custom-template/app/__generated__/_index.tsx
@@ -92,19 +92,19 @@ const Page = ({}: { system: any }) => {
{"DO NOT TOUCH THIS PROJECT, IT'S USED FOR FIXTURES"}
{
}
width={1024}
height={1024}
- className="ccgiojm cv4f3rn cer5re4 c9lz7ss"
+ className="w-image ccgiojm cv4f3rn cer5re4 c9lz7ss"
/>
-
+
{"Below Image"}
{
"\n\nSCRIPTS ARE HERE
"
}
clientOnly={true}
+ className="w-html-embed"
/>
{
code={
"\n\nSCRIPTS ARE HERE
"
}
+ className="w-html-embed"
/>
{"Goto Scr"}
@@ -152,7 +159,7 @@ const Page = ({}: { system: any }) => {
data-ws-component="Vimeo"
url={"https://player.vimeo.com/video/831343124"}
showPreview={true}
- className="c17osjft c5kxibo c8mrdqb"
+ className="w-vimeo c17osjft c5kxibo c8mrdqb"
>
{
alt={"Vimeo video preview image"}
sizes={"100vw"}
src={"/custom-folder/home_wsKvRSqvkajPPBeycZ-C8.svg"}
- className="c13adha2 c19kjzjn c8mrdqb chv0hit c1vw7ut7 c64vnj4 cow7xo6 cddunt6 cqjhyu2"
+ className="w-vimeo-preview-image c13adha2 c19kjzjn c8mrdqb chv0hit c1vw7ut7 c64vnj4 cow7xo6 cddunt6 cqjhyu2"
/>
{
''
}
executeScriptOnCanvas={false}
+ className="w-html-embed"
/>
{
code={
''
}
+ className="w-html-embed"
/>
diff --git a/fixtures/webstudio-custom-template/app/__generated__/index.css b/fixtures/webstudio-custom-template/app/__generated__/index.css
index 57f6dc04b0..ba545c4834 100644
--- a/fixtures/webstudio-custom-template/app/__generated__/index.css
+++ b/fixtures/webstudio-custom-template/app/__generated__/index.css
@@ -12,7 +12,7 @@ html {
min-height: 100%;
}
@media all {
- body:where([data-ws-component="Body"]) {
+ :where(body.w-body) {
font-family: Arial, Roboto, sans-serif;
font-size: 16px;
line-height: 1.2;
@@ -25,7 +25,7 @@ html {
-moz-osx-font-smoothing: grayscale;
margin: 0;
}
- h1:where([data-ws-component="Heading"]) {
+ :where(h1.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -33,7 +33,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h2:where([data-ws-component="Heading"]) {
+ :where(h2.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -41,7 +41,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h3:where([data-ws-component="Heading"]) {
+ :where(h3.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -49,7 +49,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h4:where([data-ws-component="Heading"]) {
+ :where(h4.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -57,7 +57,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h5:where([data-ws-component="Heading"]) {
+ :where(h5.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -65,7 +65,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h6:where([data-ws-component="Heading"]) {
+ :where(h6.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -73,7 +73,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- a:where([data-ws-component="Link"]) {
+ :where(a.w-link) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -83,7 +83,7 @@ html {
min-height: 1em;
display: inline-block;
}
- div:where([data-ws-component="Vimeo"]) {
+ :where(div.w-vimeo) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -91,7 +91,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- img:where([data-ws-component="VimeoPreviewImage"]) {
+ :where(img.w-vimeo-preview-image) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -102,7 +102,7 @@ html {
display: block;
height: auto;
}
- button:where([data-ws-component="VimeoPlayButton"]) {
+ :where(button.w-vimeo-play-button) {
font-family: inherit;
font-size: 100%;
line-height: 1.15;
@@ -118,7 +118,7 @@ html {
text-transform: none;
margin: 0;
}
- div:where([data-ws-component="Box"]) {
+ :where(div.w-box) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -126,7 +126,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- address:where([data-ws-component="Box"]) {
+ :where(address.w-box) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -134,7 +134,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- article:where([data-ws-component="Box"]) {
+ :where(article.w-box) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -142,7 +142,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- aside:where([data-ws-component="Box"]) {
+ :where(aside.w-box) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -150,7 +150,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- figure:where([data-ws-component="Box"]) {
+ :where(figure.w-box) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -158,7 +158,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- footer:where([data-ws-component="Box"]) {
+ :where(footer.w-box) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -166,7 +166,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- header:where([data-ws-component="Box"]) {
+ :where(header.w-box) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -174,7 +174,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- main:where([data-ws-component="Box"]) {
+ :where(main.w-box) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -182,7 +182,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- nav:where([data-ws-component="Box"]) {
+ :where(nav.w-box) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -190,7 +190,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- section:where([data-ws-component="Box"]) {
+ :where(section.w-box) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -198,10 +198,10 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where([data-ws-component="HtmlEmbed"]) {
+ :where(div.w-html-embed) {
display: contents;
}
- div:where([data-ws-component="VimeoSpinner"]) {
+ :where(div.w-vimeo-spinner) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -209,7 +209,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- img:where([data-ws-component="Image"]) {
+ :where(img.w-image) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
diff --git a/fixtures/webstudio-remix-netlify-edge-functions/app/__generated__/[another-page]._index.tsx b/fixtures/webstudio-remix-netlify-edge-functions/app/__generated__/[another-page]._index.tsx
index 7cf0971d61..d8c98243d2 100644
--- a/fixtures/webstudio-remix-netlify-edge-functions/app/__generated__/[another-page]._index.tsx
+++ b/fixtures/webstudio-remix-netlify-edge-functions/app/__generated__/[another-page]._index.tsx
@@ -18,8 +18,16 @@ export const pageBackgroundImageAssets: ImageAsset[] = [];
const Page = ({}: { system: any }) => {
return (
-
-
+
+
{"Another page"}
diff --git a/fixtures/webstudio-remix-netlify-edge-functions/app/__generated__/_index.tsx b/fixtures/webstudio-remix-netlify-edge-functions/app/__generated__/_index.tsx
index 3ceab9547b..b3f8b2e3ea 100644
--- a/fixtures/webstudio-remix-netlify-edge-functions/app/__generated__/_index.tsx
+++ b/fixtures/webstudio-remix-netlify-edge-functions/app/__generated__/_index.tsx
@@ -31,15 +31,19 @@ const Page = ({}: { system: any }) => {
-
+
{"Simple Project to test CLI"}
{"Please don't change directly in the fixture"}
@@ -47,6 +51,7 @@ const Page = ({}: { system: any }) => {
data-ws-id="pjkZo5EiBqaeUXBcyHf_O"
data-ws-component="Link"
href={"/another-page"}
+ className="w-link"
>
{"Test another page link"}
diff --git a/fixtures/webstudio-remix-netlify-edge-functions/app/__generated__/index.css b/fixtures/webstudio-remix-netlify-edge-functions/app/__generated__/index.css
index 2370a7e646..bc9e936306 100644
--- a/fixtures/webstudio-remix-netlify-edge-functions/app/__generated__/index.css
+++ b/fixtures/webstudio-remix-netlify-edge-functions/app/__generated__/index.css
@@ -4,7 +4,7 @@ html {
min-height: 100%;
}
@media all {
- body:where([data-ws-component="Body"]) {
+ :where(body.w-body) {
font-family: Arial, Roboto, sans-serif;
font-size: 16px;
line-height: 1.2;
@@ -17,7 +17,7 @@ html {
-moz-osx-font-smoothing: grayscale;
margin: 0;
}
- h1:where([data-ws-component="Heading"]) {
+ :where(h1.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -25,7 +25,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h2:where([data-ws-component="Heading"]) {
+ :where(h2.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -33,7 +33,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h3:where([data-ws-component="Heading"]) {
+ :where(h3.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -41,7 +41,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h4:where([data-ws-component="Heading"]) {
+ :where(h4.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -49,7 +49,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h5:where([data-ws-component="Heading"]) {
+ :where(h5.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -57,7 +57,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h6:where([data-ws-component="Heading"]) {
+ :where(h6.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -65,7 +65,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where([data-ws-component="Text"]) {
+ :where(div.w-text) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -74,7 +74,7 @@ html {
outline-width: 1px;
min-height: 1em;
}
- a:where([data-ws-component="Link"]) {
+ :where(a.w-link) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
diff --git a/fixtures/webstudio-remix-netlify-functions/app/__generated__/[another-page]._index.tsx b/fixtures/webstudio-remix-netlify-functions/app/__generated__/[another-page]._index.tsx
index 7cf0971d61..d8c98243d2 100644
--- a/fixtures/webstudio-remix-netlify-functions/app/__generated__/[another-page]._index.tsx
+++ b/fixtures/webstudio-remix-netlify-functions/app/__generated__/[another-page]._index.tsx
@@ -18,8 +18,16 @@ export const pageBackgroundImageAssets: ImageAsset[] = [];
const Page = ({}: { system: any }) => {
return (
-
-
+
+
{"Another page"}
diff --git a/fixtures/webstudio-remix-netlify-functions/app/__generated__/_index.tsx b/fixtures/webstudio-remix-netlify-functions/app/__generated__/_index.tsx
index 3ceab9547b..b3f8b2e3ea 100644
--- a/fixtures/webstudio-remix-netlify-functions/app/__generated__/_index.tsx
+++ b/fixtures/webstudio-remix-netlify-functions/app/__generated__/_index.tsx
@@ -31,15 +31,19 @@ const Page = ({}: { system: any }) => {
-
+
{"Simple Project to test CLI"}
{"Please don't change directly in the fixture"}
@@ -47,6 +51,7 @@ const Page = ({}: { system: any }) => {
data-ws-id="pjkZo5EiBqaeUXBcyHf_O"
data-ws-component="Link"
href={"/another-page"}
+ className="w-link"
>
{"Test another page link"}
diff --git a/fixtures/webstudio-remix-netlify-functions/app/__generated__/index.css b/fixtures/webstudio-remix-netlify-functions/app/__generated__/index.css
index 2370a7e646..bc9e936306 100644
--- a/fixtures/webstudio-remix-netlify-functions/app/__generated__/index.css
+++ b/fixtures/webstudio-remix-netlify-functions/app/__generated__/index.css
@@ -4,7 +4,7 @@ html {
min-height: 100%;
}
@media all {
- body:where([data-ws-component="Body"]) {
+ :where(body.w-body) {
font-family: Arial, Roboto, sans-serif;
font-size: 16px;
line-height: 1.2;
@@ -17,7 +17,7 @@ html {
-moz-osx-font-smoothing: grayscale;
margin: 0;
}
- h1:where([data-ws-component="Heading"]) {
+ :where(h1.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -25,7 +25,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h2:where([data-ws-component="Heading"]) {
+ :where(h2.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -33,7 +33,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h3:where([data-ws-component="Heading"]) {
+ :where(h3.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -41,7 +41,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h4:where([data-ws-component="Heading"]) {
+ :where(h4.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -49,7 +49,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h5:where([data-ws-component="Heading"]) {
+ :where(h5.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -57,7 +57,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- h6:where([data-ws-component="Heading"]) {
+ :where(h6.w-heading) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -65,7 +65,7 @@ html {
border-left-width: 1px;
outline-width: 1px;
}
- div:where([data-ws-component="Text"]) {
+ :where(div.w-text) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
@@ -74,7 +74,7 @@ html {
outline-width: 1px;
min-height: 1em;
}
- a:where([data-ws-component="Link"]) {
+ :where(a.w-link) {
box-sizing: border-box;
border-top-width: 1px;
border-right-width: 1px;
diff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[_route_with_symbols_]._index.tsx b/fixtures/webstudio-remix-vercel/app/__generated__/[_route_with_symbols_]._index.tsx
index 713e384dcc..585a515cc2 100644
--- a/fixtures/webstudio-remix-vercel/app/__generated__/[_route_with_symbols_]._index.tsx
+++ b/fixtures/webstudio-remix-vercel/app/__generated__/[_route_with_symbols_]._index.tsx
@@ -28,12 +28,16 @@ export const pageBackgroundImageAssets: ImageAsset[] = [];
const Page = ({}: { system: any }) => {
return (
-
+
);
diff --git a/fixtures/webstudio-remix-vercel/app/__generated__/[form]._index.tsx b/fixtures/webstudio-remix-vercel/app/__generated__/[form]._index.tsx
index 81714a7409..52087722e4 100644
--- a/fixtures/webstudio-remix-vercel/app/__generated__/[form]._index.tsx
+++ b/fixtures/webstudio-remix-vercel/app/__generated__/[form]._index.tsx
@@ -39,7 +39,11 @@ const Page = ({}: { system: any }) => {
let [formState, set$formState] = useState("initial");
let [formState_1, set$formState_1] = useState("initial");
return (
-
+