Skip to content

Commit f723187

Browse files
authored
Merge pull request #10874 from Turbo87/composes
CSS: Remove `composes` usage
2 parents 599131e + f5116ab commit f723187

File tree

87 files changed

+196
-427
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+196
-427
lines changed

app/components/color-scheme-menu.hbs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
<Dropdown local-class="dropdown" data-test-dark-mode-menu ...attributes as |dd|>
22
<dd.Trigger @hideArrow={{true}} local-class="trigger" data-test-dark-mode-toggle>
33
{{svg-jar this.icon local-class="icon"}}
4-
<span local-class="trigger-label">Change color scheme</span>
4+
<span class="sr-only">Change color scheme</span>
55
</dd.Trigger>
66

77
<dd.Menu local-class="menu" as |menu|>
88
{{#each this.colorSchemes as |colorScheme|}}
99
<menu.Item>
1010
<button
1111
local-class="menu-button {{if (eq colorScheme.mode this.colorScheme.scheme) 'selected'}}"
12+
class="button-reset"
1213
type="button"
1314
{{on 'click' (fn this.colorScheme.set colorScheme.mode)}}
1415
>

app/components/color-scheme-menu.module.css

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,12 @@
1313
padding: 0;
1414
}
1515

16-
.trigger-label {
17-
composes: sr-only from '../styles/shared/a11y.module.css'
18-
}
19-
2016
.menu {
2117
right: 0;
2218
min-width: max-content;
2319
}
2420

2521
.menu-button {
26-
composes: button-reset from '../styles/shared/buttons.module.css';
2722
align-items: center;
2823
gap: var(--space-2xs);
2924
cursor: pointer;

app/components/crate-row.hbs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@
1212
@copyText='{{@crate.name}} = "{{@crate.default_version}}"'
1313
title="Copy Cargo.toml snippet to clipboard"
1414
local-class="copy-button"
15+
class="button-reset"
1516
data-test-copy-toml-button
1617
>
1718
{{svg-jar "copy" alt="Copy Cargo.toml snippet to clipboard"}}
1819
</CopyButton>
1920
{{/if}}
2021
</div>
21-
<div local-class="description" data-test-description>
22+
<div local-class="description" class="text--small" data-test-description>
2223
{{ truncate-text @crate.description }}
2324
</div>
2425
</div>

app/components/crate-row.module.css

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
}
2525

2626
.copy-button {
27-
composes: button-reset from '../styles/shared/buttons.module.css';
2827
color: var(--main-color);
2928
cursor: pointer;
3029

@@ -66,7 +65,6 @@
6665
}
6766

6867
.description {
69-
composes: small from '../styles/shared/typography.module.css';
7068
margin-top: calc(var(--space-xs) / 2);
7169
line-height: 1.5;
7270
}

app/components/crate-sidebar.hbs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@
115115
target="_blank"
116116
rel="noopener noreferrer"
117117
local-class="playground-button"
118+
class="button button--small"
118119
data-test-playground-button
119120
>
120121
Try on Rust Playground
@@ -125,7 +126,7 @@
125126
{{/if}}
126127
</a>
127128
{{#unless this.canHover}}
128-
<p local-class="playground-help" data-test-playground-help>
129+
<p local-class="playground-help" class="text--small" data-test-playground-help>
129130
The top 100 crates are available on the Rust Playground for you to
130131
try out directly in your browser.
131132
</p>
@@ -137,6 +138,7 @@
137138
@query={{hash inquire="crate-violation" crate=@crate.name}}
138139
data-test-id="link-crate-report"
139140
local-class="report-button"
141+
class="button button--red button--small"
140142
>
141143
Report crate
142144
</LinkTo>

app/components/crate-sidebar.module.css

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,35 +58,22 @@
5858
}
5959
}
6060

61-
.more-versions-link,
62-
.reverse-deps-link {
63-
composes: small from '../styles/shared/typography.module.css';
64-
}
65-
6661
.categories {
6762
margin: 0;
6863
padding-left: 20px;
6964
line-height: 1.5;
7065
}
7166

72-
.button {
67+
.report-button, .playground-button {
7368
justify-content: center;
7469
width: 220px;
7570
}
7671

77-
.report-button {
78-
composes: button;
79-
composes: red-button small from '../styles/shared/buttons.module.css';
80-
}
81-
8272
.playground-button {
83-
composes: button;
84-
composes: yellow-button small from '../styles/shared/buttons.module.css';
8573
margin-bottom: var(--space-2xs);
8674
}
8775

8876
.playground-help {
89-
composes: small from '../styles/shared/typography.module.css';
9077
max-width: 220px;
9178
text-align: justify;
9279
line-height: 1.3em;

app/components/crate-sidebar/link.module.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
}
55

66
.title {
7-
composes: heading from '../crate-sidebar.module.css';
7+
font-size: 1.17em;
8+
margin: 0 0 var(--space-s);
89
}
910

1011
.icon {

app/components/dependency-list/row.module.css

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
}
9090
}
9191

92-
.metadata {
92+
.optional-label, .features-label {
9393
color: var(--grey600);
9494
text-transform: uppercase;
9595
letter-spacing: .7px;
@@ -123,14 +123,6 @@
123123
}
124124
}
125125

126-
.optional-label {
127-
composes: metadata;
128-
}
129-
130-
.features-label {
131-
composes: metadata;
132-
}
133-
134126
.feature-list {
135127
padding: 0;
136128
margin: var(--space-2xs) var(--space-3xs);

app/components/email-input.hbs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
<button
2828
type='submit'
2929
local-class="save-button"
30+
class="button button--small"
3031
disabled={{not this.value}}
3132
data-test-save-button
3233
>
@@ -35,7 +36,7 @@
3536

3637
<button
3738
type="button"
38-
local-class="cancel-button"
39+
class="button button--small"
3940
data-test-cancel-button
4041
{{on "click" (fn (mut this.isEditing) false)}}
4142
>
@@ -60,7 +61,7 @@
6061
<div local-class="actions">
6162
<button
6263
type="button"
63-
local-class="edit-button"
64+
class="button button--small"
6465
data-test-edit-button
6566
{{on "click" this.editEmail}}
6667
>
@@ -79,7 +80,7 @@
7980
<div local-class="actions">
8081
<button
8182
type="button"
82-
local-class="resend-button"
83+
class="button button--small"
8384
disabled={{this.disableResend}}
8485
data-test-resend-button
8586
{{on "click" (perform this.resendEmailTask)}}

app/components/email-input.module.css

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,6 @@
4747
align-items: center;
4848
}
4949

50-
.save-button,
51-
.cancel-button,
52-
.edit-button,
53-
.resend-button {
54-
composes: yellow-button small from '../styles/shared/buttons.module.css';
55-
}
56-
5750
.save-button {
5851
margin-right: var(--space-2xs);
5952
}

0 commit comments

Comments
 (0)