You are viewing limited content. For full access, please sign in.

Question

Question

New Forms Designer CSS - Setting body element attributes not possible?

asked on June 20, 2024

When I put attributes on the body such as

body {
 background-color: grey;
}

It does not even show in the developer console that I even tried to add this attribute. Normally if it did not work because of an override I would at least see it crossed out.

Only happens in the new designer.

I like to use pure CSS backgrounds which look good, load fast, and do not save to the repository. I am just giving a simpler example in this post which can obviously be done in the theme designer.

0 0

Answer

SELECTED ANSWER
replied on June 20, 2024

I've successfully changed the background color with the following CSS:

&.Form.lf-form { 
  background: #FFFFFF !important;
}

Note that it doesn't show in the designer, but it will once you save and preview.

Hope this helps!

1 0
replied on June 20, 2024

This is the correct answer. Using this syntax is the highest level of the DOM you have access to. It should be high enough to change anything you need outside of the dropdown box UI

1 0
replied on June 21, 2024

That is what I needed, thank you!

0 0
replied on June 21, 2024

No problem at all, happy to help!

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.