# @shachi-ui/styles

## 0.4.0

### Minor Changes

- `sh-badge` gains a `highlight` variant for badges that should stand out. The brutal theme renders it as white text on a black background.
- Make primary component text in the brutal theme inherit the surrounding font size without a default reduction. Preserve relative sizes for secondary text, button sizes, badges, tooltips, keyboard shortcuts, and rating symbols, and avoid compounded text reductions in nested components.
- `sh-code-block` gets a toolbar before the code, built from three new attributes: `with-copy` adds a button copying the code to the clipboard, `filename` shows a file name, and `with-language` shows the language's name. The button is always visible and never covers the code, and a file name also names the code region for assistive technologies while it scrolls. Style them with the `toolbar`, `label`, `copy`, `copy-button` and `copy-icon` parts; the brutal theme does so out of the box, and a theme can lay the toolbar out as a column beside the code. `sh-code-example` now shows its copy button the same way: it moves from a hover-revealed corner to a toolbar above the code, styled with the new `code-toolbar` part.
- New `sh-frame` component: embeds another document in an isolated frame and shows a spinner until it has loaded, so a lazy frame never looks empty. The embedded document can stay transparent and take the background of the page around it. Replace the spinner with your own content through the `loader` slot, and listen to `load` to know when the document is ready. The brutal theme styles it.
- Rename the `sh-icon` size custom property from `--sh-icon-size` to `--icon-size`, and the `--icon-size` of `sh-pagination` and `sh-pagination-bar` to `--button-icon-size`. Replace `--sh-icon-size` with `--icon-size` wherever you set it.
- Cascade layers are simpler: the empty `shachi.components` layer is gone, and `shachi.elements` now comes before `shachi.compositions`, so a layout class always wins over a base element style. If you wrote your own rules into `@layer shachi.components`, move them to `@layer shachi.themes`; left as is, they would now be ordered after `shachi.utilities` and override everything.
- New `sh-marquee` component: scrolls text, images or any content in an endless loop, in either direction. Nothing is duplicated, so each item is read once by screen readers and styled by your page as usual; items can be of any size. A built-in button pauses the motion, which also holds on hover and while focus is inside, and nothing moves for users who prefer reduced motion. Set the speed with `--speed` and the spacing with `--gap`. The brutal theme styles it.
- `sh-page` is a layout composition, so the brutal theme no longer paints it. Set borders, padding, and colors yourself with `sh-page::part(...)`.
- New `sh-progress-indicator` component, with its `sh-progress-indicator-step` children: shows how far a user has got through a sequence of steps. Set the current position with `current`; earlier steps are shown as complete and later ones as upcoming. Mark a step `invalid` to flag an error, give it an `href` to make it a link, and add a secondary text with the `description` slot. Steps are laid out in a row, or in a column with `orientation="vertical"`; a horizontal indicator also switches to a column on its own when it is narrower than `collapse` pixels (640 by default), so no label is ever hidden on small screens. Completed and invalid steps are announced by screen readers and do not rely on colour alone. The brutal theme styles it.

### Patch Changes

- The brutal theme gives `sh-details` the same rounded corners and hard offset shadow as `sh-card`.
- Fix uneven borders in horizontal button groups containing three or more buttons.
- Fix hover, active and focus styles of the brutal theme that were ignored on inner parts (buttons, pagination, carousel, dialog close button, steppers and others).
- Fix syntax highlighting in iOS Safari when loading custom elements with the core styles, including with custom themes. Elements still remain hidden until defined or until the two-second loading fallback expires.
- Fix `sh-tooltip` so assistive technologies read its text as the anchor's description while the tooltip is closed, not only while it is open. The brutal theme keeps the closing fade.

## 0.3.0

### Minor Changes

- `sh-code-block` now highlights TypeScript (`ts`), JSON (`json`) and shell commands (`bash`, also written `sh`, `shell` or `zsh`), and recognizes regular expression literals in JavaScript. Themes get three new color properties for them: `--token-type`, `--token-regexp` and `--token-variable`.
- `sh-code-block` now highlights YAML (`yaml`, also `yml`), diffs (`diff`, also `patch`) and Markdown (`md`, also `markdown`). Fenced code blocks in Markdown are colored in the language they name, and a front matter block is read as YAML. Themes get two new color properties, `--token-inserted` and `--token-deleted`, for the added and removed lines of a diff.
- New `sh-scroll-spy` component: an "On this page" table of contents that marks the link of the section in view as current. Write the links flat or generate them from a container's headings with `for`; the component nests them by heading level and builds an accessible list. Browsers that support `scroll-target-group` track the section natively, and the others fall back to measuring on scroll. The brutal theme styles it.

### Patch Changes

- Double-tapping a button, link, or other interactive control no longer zooms the page on touch devices. Pinch zoom still works.

## 0.2.1

No changes in this release.

## 0.2.0

### Minor Changes

- Style `sh-expander` in the brutal theme.

### Patch Changes

- Build the published CSS for an explicit browser floor (Chrome and Edge 125, Firefox 126, Safari 17.4) instead of Vite's default targets.
- Drop the `git+` prefix from the repository URL in the package metadata.
- Point the package homepage at the documentation site, https://shachi-ui.com.

## 0.1.0

First public release.
