Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions .github/workflows/sync-package-version-with-main.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,8 @@
name: Sync Package Version With Main

on:
pull_request:
branches:
- main
types:
- opened
- reopened
- synchronize
- ready_for_review
# Release and hotfix branches intentionally carry versions that can differ
# from main, so this workflow must stay opt-in instead of mutating PR heads.
workflow_dispatch:

permissions:
Expand All @@ -17,7 +11,6 @@ permissions:
jobs:
sync-package-version:
if: >
(github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository) &&
!startsWith(github.head_ref || github.ref_name, 'release/')
runs-on: ubuntu-latest
steps:
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@

All notable changes to **UI Style Kit CSS** will be documented here.

## [2.0.4] - 2026-07-20

### Added

- Restored the exported `content-overflow.css` shared layer for standalone style imports.
- Added rendered regression coverage for long text containment and responsive orientation checks across mobile, tablet, desktop, portrait, and landscape viewports.

### Changed

- Replaced the regex minifier with exactly pinned Lightning CSS parsing while preserving generated bundle banners and entry points.
- Aligned package metadata, generated bundle banners, demo structured data, and release documentation to `2.0.4`.
- Reconnected every standalone UI preset to the shared content-overflow layer so long words, URLs, and token strings stay inside layout wrappers.

### Fixed

- Preserved descendant combinators and required whitespace around binary operators in generated `calc()` values.
- Moved `::file-selector-button` and `::backdrop` outside `:where()` arguments so Chromium accepts and applies the native rules.
- Routed Brutalism, Cyberpunk, Y2K, and Retro Glass status foregrounds through their documented `on-success`, `on-warning`, and `on-danger` tokens.

## [2.0.3] - 2026-07-11

### Added
Expand Down
35 changes: 27 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It is separate from, but complementary to, **Interactive Surface CSS**. Use **UI

## Current Release

`v2.0.3` is the current v2 patch release. It keeps the `v2.0.1` shared color-scheme and native-element model, adds a demo theme-override workbench, improves copyable documentation examples, and refreshes release metadata without changing the CSS API.
`v2.0.4` is the current v2 correctness patch. It adds parser-based minification, restores valid native file-button and modal-backdrop styling, routes status foregrounds through semantic `on-*` tokens, and retains the shared content-overflow and responsive coverage work without changing the CSS API.

[Showcase website](https://foscat.github.io/ui-style-kit-css/)

Expand Down Expand Up @@ -44,13 +44,27 @@ flowchart TB

The demo page documents this flow directly: it shows computed RGB color tokens for the active theme and mode, lets developers edit them live, and copies the exact override block to drop into an app stylesheet.

## Ecosystem compatibility

These libraries stay standalone, but the current aligned set is:

| Library | Aligned version | Owns |
|---|---:|---|
| `ui-style-kit-css@2.0.4` | source release target | visual identity, color themes, UI paint, native HTML styling, content wrapping, and bridge tokens |
| `interactive-surface-css@1.3.0` | latest published sibling | interaction-state primitives, surface behavior, state layers, and input affordances |
| `layout-style-css@1.1.2` | latest published sibling | structural wrappers, grids, sections, app shells, and layout recipes |

Use one, two, or all three depending on the project. UI Style Kit does not require the sibling libraries, and the optional bridge only maps shared `--usk-*` roles into Interactive Surface tokens when consumers import it.

For import order, ownership boundaries, and adoption paths, see the [Ecosystem guide](docs/ECOSYSTEM.md).

## Features

- 11 UI style systems
- 10 shared color schemes
- `light`, `dark`, and `contrast` modes
- Combined CSS bundle and per-style production imports
- Shared `theme-colors.css` scheme layer and `native-elements.css` fallback layer for all UI systems
- Shared `theme-colors.css`, `native-elements.css`, and `content-overflow.css` layers for all UI systems
- Scoped native HTML element coverage, including semantic containers and inline text elements
- Visible `:focus-visible` defaults
- Skip-link and visually-hidden helpers per style prefix
Expand All @@ -77,11 +91,12 @@ Use a single style import for production apps that use one visual system:
import "ui-style-kit-css/minimal-saas.css";
```

In `v2.0.3`, standalone style files import the shared color-scheme layer from `styles/theme-colors.css` and the shared native-element fallback layer from `styles/native-elements.css`. Bundlers that understand CSS `@import` will resolve them automatically. If your build pipeline does not resolve CSS imports, import the shared dependencies before the style file:
In `v2.0.4`, standalone style files import the shared color-scheme layer from `styles/theme-colors.css`, the shared native-element fallback layer from `styles/native-elements.css`, and the shared content-overflow layer from `styles/content-overflow.css`. Bundlers that understand CSS `@import` will resolve them automatically. If your build pipeline does not resolve CSS imports, import the shared dependencies before the style file:

```js
import "ui-style-kit-css/theme-colors.css";
import "ui-style-kit-css/native-elements.css";
import "ui-style-kit-css/content-overflow.css";
import "ui-style-kit-css/minimal-saas.css";
```

Expand Down Expand Up @@ -119,21 +134,22 @@ When the bridge is attached, add `.interactive-surface` to interactable elements

| Import | Raw | Gzip | Best for |
|---|---:|---:|---|
| `ui-style-kit-css/dist/ui-style-kit.min.css` | ~269 KB | ~34 KB | Runtime UI-system switchers and demos |
| `ui-style-kit-css/with-bridge.css` | ~331 KB | ~39 KB | Runtime switchers plus Interactive Surface bridge |
| `ui-style-kit-css/dist/ui-style-kit.min.css` | ~271 KB | ~35 KB | Runtime UI-system switchers and demos |
| `ui-style-kit-css/with-bridge.css` | ~339 KB | ~40 KB | Runtime switchers plus Interactive Surface bridge |
| `ui-style-kit-css/theme-colors.css` | ~25 KB | ~3 KB | Shared color schemes for standalone style imports |
| `ui-style-kit-css/native-elements.css` | ~13 KB | ~2 KB | Shared native HTML fallback styling |
| `ui-style-kit-css/content-overflow.css` | ~7 KB | ~1 KB | Shared long-text containment for standalone style imports |
| Single style imports | ~26-28 KB | ~5-6 KB | Production apps with one visual system |

## CDN usage

After publishing to NPM:
Use the latest published NPM package:

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ui-style-kit-css@latest/dist/ui-style-kit.min.css" />
```

For production, pin a version:
For production today, pin the latest published patch. Update this pin to `2.0.4` after that release is published:

```html
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/ui-style-kit-css@2.0.3/dist/ui-style-kit.min.css" />
Expand Down Expand Up @@ -209,6 +225,8 @@ contrast

`styles/native-elements.css` owns the shared native selectors under `[data-ui][data-theme][data-mode]`. Each style system maps those selectors to its visual identity through `--usk-native-*` tokens, so native controls keep the same coverage while inheriting each preset's radius, shadows, borders, typography, and color surfaces.

`styles/content-overflow.css` owns the shared text containment contract under `[data-ui][data-theme][data-mode]`. It keeps headings, paragraphs, links, table cells, controls, badges, nav links, and common UI wrappers from widening their parent wrapper when content contains long words, hashes, URLs, or copyable tokens.

The shared native layer covers common native elements, including:

- semantic containers: `main`, `section`, `header`, `footer`, `nav`, `article`, `aside`, `address`
Expand Down Expand Up @@ -308,6 +326,7 @@ ui-style-kit-css/
styles/
theme-colors.css
native-elements.css
content-overflow.css
minimal-saas.css
bento.css
maximalist.css
Expand Down Expand Up @@ -343,7 +362,7 @@ The `v2.0.1` release line removes duplicated per-UI color-scheme blocks. Color s

- Use `--usk-*-rgb` when defining or overriding a color scheme.
- Continue using prefixed functional tokens such as `--saas-primary`, `--neo-card-bg`, and `--rg-on-primary` inside components.
- Import `ui-style-kit-css/theme-colors.css` and `ui-style-kit-css/native-elements.css` before standalone style files if your bundler does not follow CSS `@import`.
- Import `ui-style-kit-css/theme-colors.css`, `ui-style-kit-css/native-elements.css`, and `ui-style-kit-css/content-overflow.css` before standalone style files if your bundler does not follow CSS `@import`.
- Keep using `ui-style-kit-css/interactive-surface-bridge` or `ui-style-kit-css/with-bridge.css` for the opt-in bridge. The bridge now inherits shared `--usk-*` roles and exposes three `data-surface-level` visual states while the default bundle remains bridge-free.

## License
Expand Down
10 changes: 9 additions & 1 deletion STYLE-MAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## UI systems

Color schemes are defined once in `styles/theme-colors.css`. Native HTML fallback selectors are defined once in `styles/native-elements.css`. Each UI system file imports both shared layers, aliases `--usk-*` RGB roles back to its prefix, and maps `--usk-native-*` tokens into the preset's visual identity.
Color schemes are defined once in `styles/theme-colors.css`. Native HTML fallback selectors are defined once in `styles/native-elements.css`. Long-text containment rules are defined once in `styles/content-overflow.css`. Each UI system file imports all shared layers, aliases `--usk-*` RGB roles back to its prefix, and maps `--usk-native-*` tokens into the preset's visual identity.

| UI style | `data-ui` | Prefix | File |
|---|---:|---:|---|
Expand Down Expand Up @@ -32,6 +32,14 @@ Color schemes are defined once in `styles/theme-colors.css`. Native HTML fallbac

Native selectors stay generic under `[data-ui][data-theme][data-mode]`. Presets only provide token mappings such as `--usk-native-surface`, `--usk-native-radius`, and `--usk-native-shadow`, which avoids repeating the same fieldset, table, dialog, details, form, and semantic-element rules in every UI file.

## Shared overflow layer

| Purpose | Import |
|---|---|
| Shared long-text containment for UI wrappers and controls | `styles/content-overflow.css` |

The overflow layer keeps headings, paragraphs, links, table cells, controls, badges, nav links, and common layout wrappers from widening the page when content includes long tokens or URLs.

## Bridge bundle

| Purpose | Import |
Expand Down
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"programmingLanguage": "CSS",
"runtimePlatform": "Web browser",
"license": "https://github.com/Foscat/ui-style-kit-css/blob/main/LICENSE",
"version": "2.0.3",
"version": "2.0.4",
"url": "https://foscat.github.io/ui-style-kit-css/",
"downloadUrl": "https://www.npmjs.com/package/ui-style-kit-css",
"isAccessibleForFree": true,
Expand Down
Loading
Loading