Hoppa till huvudinnehåll

CSS in blocks

Snowfire is using SCSS behind the scenes to sprinkle the styling with a couple of extra features.

Uppdaterad för mer än en vecka sedan

Snowfire is using SCSS behind the scenes to sprinkle the styling with a couple of extra features.

> Important: We recommend only using the block CSS to style blocks. Please don't attempt to write CSS selectors in style.scss for blocks. If you want to style a default block, make a new block based on it and change its style instead.

No naming conflicts - ever

The platform automatically namespaces block CSS.

Example

Input code:

.content {
background: #00ff00;
}

Output code:

.sf-block-40[data-block-id="77"] .content {
background: #00ff00;
}

This means that your .content class won't conflict with any other block.

CSS Screenshot

Fick du svar på din fråga?