Manage styles and CSS variables
Strukt keeps element classes and CSS connected to the same HTML document you edit visually. Use small local rules for an individual element and deliberate shared rules for patterns reused across pages. CSS variables make repeated values easier to change consistently.
Before you start
Section titled “Before you start”- Identify whether the styling belongs to this element, the whole document or a website-level CSS file. Save a recovery copy before reorganizing an existing stylesheet.
-
Select an element and inspect its classes and CSS. Use descriptive class names for reusable patterns. Changing a shared class can affect several elements; inspect those other uses before publishing.
-
Define repeated values as custom properties in an appropriate scope, for example
--space-section: clamp(2rem, 5vw, 5rem). Reference them withvar(--space-section)in spacing rules. Use values suitable for your own design. -
Keep page-specific rules in the document and move truly shared styles into a managed site CSS file when needed. Save that file separately, then review its inclusion and published version during page publication.
-
Preview focused controls, contrast, long text and responsive widths. Check the browser’s computed styles when a declaration loses to a more specific selector or later source.
Check the result
Section titled “Check the result”- Changing one variable updates its intended uses, and unrelated pages keep their expected appearance.
Troubleshooting
Section titled “Troubleshooting”If shared CSS is missing publicly, check the file’s saved state, inclusion order and live version. Dynamically generated class names may need a safelist when CSS subsetting is enabled. Do not solve a missing publication by duplicating every rule inline.
Related guides
Section titled “Related guides”- Create shared CSS and JavaScript files
- Recover file edits and resolve conflicts
- Design responsive layouts
Applies to Strukt c02552848c92 · 2026-10-31