今日已更新 53 条资讯 | 累计 39582 条内容
关于我们

标签:#scss

找到 2 篇相关文章

AI 资讯

FSCSS Component Architecture: A Modular, Composition-First Approach to CSS

FSCSS component architecture is built around a modular, composition-first model that compiles to plain CSS. It emphasizes reusable style units, design tokens, conditional logic, and selective imports—with almost no runtime JavaScript required for the final output. Components in FSCSS are treated as pure style definitions rather than framework-specific widgets, keeping stylesheets readable, highly reusable, and free of classic “mega-stylesheet” problems while still producing standard CSS that any browser understands. Core Building Blocks FSCSS provides a focused set of primitives for defining and composing styles: Primitive Purpose Best for Introduced / Key version str(name, "…") Named blocks of CSS declarations Simple reusable style snippets Core @fun(name){…} Key-value stores (design tokens) Spacing scales, color palettes, property groups Core @define name(params) Parameterized mixins Themed components, variants, full structures 1.1.15+ pattern(threshold: "desc", "…") Semantic / fuzzy matching Natural-language style injection 1.1.25+ @event name(param) Conditional value functions Themes, states, calculations Core @arr(name[…]) Arrays + iteration Generated classes, loops, scales Core @import Selective / wildcard module loading Modular architecture & ecosystem modules Core How Components Are Structured 1. Atomic / Token Layer ( @fun + variables) Design tokens sit at the foundation so every component draws from a single source of truth: @fun(tokens) { primary: #2563eb; radius-md: 8px; space-4: 1rem; shadow-sm: 0 1px 3px rgba(0,0,0,.1); } 2. Base Style Blocks ( str() or @fun full-block) Related declarations are grouped into reusable blocks that can be dropped into any selector: str(card-base, " padding: @fun.tokens.space-4.value; border-radius: @fun.tokens.radius-md.value; box-shadow: @fun.tokens.shadow-sm.value; background: white; ") 3. Parameterized Components ( @define ) True mixins accept arguments and can be composed freely: @define button(bg: #2563eb, fg: white,

2026-09-03 原文 →
AI 资讯

The evolution of how we use CSS

CSS has been around for about 30 years. It is the only styling language built specifically for the web platform, and it is one of the three core technologies that make the web what it is. Without it, every page would be a block of black text on a white background, laid out from top to bottom with no control whatsoever. That is not an exaggeration. That is what the web looks like without CSS. The original design goal of CSS has never changed. It is a declarative language that describes how documents should be presented. It does one thing and it does it in a standardized way that works across browsers. That restraint is not a weakness. It is the reason CSS has survived for two decades without being replaced. It never tried to be more than a styling language. Looking back at frontend development in the late 2000s, the frustration is hard to overstate. The gap between what CSS could do and what designs required was so wide that the platform itself felt like the obstacle. The vendor prefix era is the clearest example. You wrote -webkit- , -moz- , -ms- , -o- before every experimental property, often all four, because no browser could agree on when a feature was stable. Autoprefixer became a standard dependency not because developers were lazy, but because manual prefix management was genuinely unsustainable. It was not that CSS was badly designed. It was that the pace of the platform could not keep up with what developers were building. This created a pattern. Every time the platform fell short, the community built a workaround. Those workarounds became tools. Those tools became dependencies. And those dependencies reshaped how we thought about CSS entirely. Each new abstraction solved a real problem, but it also moved us further from writing actual CSS. Eventually, it became natural to assume that any serious project needed a layer on top of CSS to be viable. However, if CSS is so good at its job, why have we spent so long building alternative ecosystems on top of it? Pr

2026-07-19 原文 →