Variables and Theming - CSS Typing CST Test
Loading…
Variables and Theming — CSS Code
Demonstrates using CSS custom properties for color theming.
:root {
--primary-color: #ff6347;
--secondary-color: #4caf50;
}
body {
background: var(--secondary-color);
color: white;
font-family: sans-serif;
}
.button {
background: var(--primary-color);
padding: 0.5rem 1rem;
border: none;
border-radius: 4px;
color: white;
cursor: pointer;
transition: background 0.3s ease;
}
.button:hover {
background: darken(var(--primary-color), 10%);
}CSS Language Guide
CSS (Cascading Style Sheets) is a stylesheet language used to describe the presentation of HTML documents. It controls layout, colors, fonts, spacing, and visual effects, separating content structure from design.
Primary Use Cases
- ▸Styling web pages and HTML elements
- ▸Responsive design for multiple screen sizes
- ▸Creating layouts using Flexbox and Grid
- ▸Applying animations and transitions
- ▸Theme management and branding for websites
Notable Features
- ▸Selectors and combinators to target elements
- ▸Box model controlling margins, borders, padding, and content
- ▸Media queries for responsive design
- ▸Pseudo-classes and pseudo-elements for advanced styling
- ▸Support for transitions, animations, and transformations
Origin & Creator
Developed by Håkon Wium Lie in 1994 while working with Tim Berners-Lee at CERN.
Industrial Note
CSS is specialized for visual presentation and layout rather than content creation or logic processing.