Skip to content
Open
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
13 changes: 2 additions & 11 deletions .release-plan.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,8 @@
{
"solution": {
"glimmer-scoped-css": {
"impact": "patch",
"oldVersion": "0.8.0",
"newVersion": "0.8.1",
"constraints": [
{
"impact": "patch",
"reason": "Appears in changelog section :bug: Bug Fix"
}
],
"pkgJSONPath": "./glimmer-scoped-css/package.json"
"oldVersion": "0.8.1"
}
},
"description": "## Release (2025-04-28)\n\nglimmer-scoped-css 0.8.1 (patch)\n\n#### :bug: Bug Fix\n* `glimmer-scoped-css`, `test-app`\n * [#49](https://github.com/cardstack/glimmer-scoped-css/pull/49) Fix CSS encoding to handle non-ASCII characters ([@backspace](https://github.com/backspace))\n\n#### :memo: Documentation\n* [#46](https://github.com/cardstack/glimmer-scoped-css/pull/46) prettier 3.5+ now formats <style> in gjs/gts ([@NullVoxPopuli](https://github.com/NullVoxPopuli))\n\n#### Committers: 2\n- Buck Doyle ([@backspace](https://github.com/backspace))\n- [@NullVoxPopuli](https://github.com/NullVoxPopuli)\n"
"description": "\n\n\n\n"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what’s happening here? confusing

}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog






## Release (2025-04-28)

glimmer-scoped-css 0.8.1 (patch)
Expand Down
2 changes: 2 additions & 0 deletions test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
"lint:js": "eslint . --cache",
"lint:js:fix": "eslint . --fix",
"lint:types": "tsc --noEmit",
"prestart": "pnpm --dir ../test-addon-to-import build",
"start": "ember serve",
"pretest": "pnpm --dir ../test-addon-to-import build",
"test": "concurrently \"npm:lint\" \"npm:test:*\" --names \"lint,test:\"",
"test:ember": "ember test"
},
Expand Down
40 changes: 33 additions & 7 deletions test-app/tests/acceptance/scoped-css-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,19 +130,45 @@ module('Acceptance | scoped css', function (hooks) {
test('an addon can use scoped styles', async function (assert) {
await visit('/');

assert.dom('[data-scoped-underline-addon-component]').hasStyle({
textDecoration: 'underline solid rgb(0, 0, 0)',
});
let underlineComponent = find('[data-scoped-underline-addon-component]');
if (!underlineComponent) {
throw new Error(
'[data-scoped-underline-addon-component] element not found'
);
}
let underlineComponentStyles = getComputedStyle(underlineComponent);
assert.strictEqual(
underlineComponentStyles.textDecorationLine,
'underline'
);
assert.strictEqual(
underlineComponentStyles.textDecorationColor,
'rgb(0, 0, 0)'
);

assert
.dom('[data-test-underline-component-outside-addon]')
.doesNotHaveStyle({
textDecoration: 'underline solid rgb(0, 0, 0)',
textDecoration: 'underline rgb(0, 0, 0)',
});

assert.dom('[data-test-paragraph-with-class-styled-by-addon]').hasStyle({
textDecoration: 'underline solid rgb(0, 0, 0)',
});
let classStyledParagraph = find(
'[data-test-paragraph-with-class-styled-by-addon]'
);
if (!classStyledParagraph) {
throw new Error(
'[data-test-paragraph-with-class-styled-by-addon] element not found'
);
}
let classStyledParagraphStyles = getComputedStyle(classStyledParagraph);
assert.strictEqual(
classStyledParagraphStyles.textDecorationLine,
'underline'
);
assert.strictEqual(
classStyledParagraphStyles.textDecorationColor,
'rgb(0, 0, 0)'
);
});

test('unscoped styles can use interpolation', async function (assert) {
Expand Down