g-comments 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,16 @@ All notable changes to `g-comments` are listed here. The format follows
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.2.1] - 2026-10-20
10
+
11
+ ### Changed
12
+
13
+ - The default stylesheet lives in the `gc-defaults` cascade layer and a forum
14
+ theme's CSS is imported into `gc-forum`, so site CSS beats the forum's and the
15
+ forum's beats the defaults regardless of load order or specificity. The forum
16
+ stylesheet is no longer a `<link>`: it is an `@import … layer(gc-forum)` in
17
+ the installed `<style>`.
18
+
9
19
  ## [0.2.0] - 2026-10-20
10
20
 
11
21
  ### Added
package/README.md CHANGED
@@ -134,9 +134,9 @@ depth, and `Item` keeps the inline reply, edit, report and delete panels.
134
134
  (`.gc-root.gc-root--styled`); nothing outside it is touched. Class names follow
135
135
  BEM (`gc-comment`, `gc-comment__body`, `gc-composer--replying`,
136
136
  `gc-button--primary`, …) and stay in place with `unstyled`, which only drops
137
- `gc-root--styled`. Selectors carry one class of specificity, so your own class
138
- rules win when loaded after the stylesheet. Cooked comment HTML is wrapped in
139
- `.gc-prose`.
137
+ `gc-root--styled`. The rules live in the `gc-defaults` cascade layer, so your
138
+ own (unlayered) CSS wins whatever its order or specificity. Cooked comment HTML
139
+ is wrapped in `.gc-prose`.
140
140
 
141
141
  `appearance.elements` adds class names: `root`, `header`, `count`, `sort`,
142
142
  `signIn`, `composer`, `textarea`, `toolbar`, `list`, `comment`, `avatar`,
@@ -191,14 +191,15 @@ element's shadow root. Three things arrive:
191
191
  `--gc-forum-font-monospace` carry the stacks, and `@font-face` rules are
192
192
  added to the page for fonts the forum serves.
193
193
  - **Theme CSS.** The default theme's "Embedded CSS" (Admin → Customize →
194
- Themes → Edit CSS/HTML → Embedded) is loaded as a stylesheet, so forum
195
- admins can style the `gc-*` classes without touching the site.
196
-
197
- Precedence: tokens you set (`appearance.variables`, or `--gc-*` on the root
198
- or an ancestor) win over the forum's, which win over the defaults. The forum's
199
- stylesheet is appended after the page's, so plain CSS rules tie-break in the
200
- forum's favour; out-specify them (`.blog .gc-comment`) where the site must
201
- win. `useForumTheme()` returns the same data for sites that style their own
194
+ Themes → Edit CSS/HTML → Embedded) is imported into the `gc-forum` cascade
195
+ layer, so forum admins can style the `gc-*` classes without touching the
196
+ site.
197
+
198
+ Precedence, for tokens and for plain CSS alike: what a component sets
199
+ (`appearance`) beats the site's own CSS and `--gc-*` values, which beat the
200
+ forum's, which beat the defaults. Site CSS is unlayered and the forum's sits in
201
+ `gc-forum` above `gc-defaults`, so no ordering or specificity tricks are
202
+ needed. `useForumTheme()` returns the same data for sites that style their own
202
203
  UI after the forum.
203
204
 
204
205
  ## Custom elements (no framework)