Skip to content
This repository was archived by the owner on Jan 13, 2025. It is now read-only.

Commit 6657e6f

Browse files
fix(card): Rename stroke to outline (#2633)
BREAKING CHANGE: Renames variant, classes and mixins containing the word stroke to use the word outline.
1 parent 0033990 commit 6657e6f

File tree

7 files changed

+10
-10
lines changed

7 files changed

+10
-10
lines changed

demos/card.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ <h3 class="demo-card__subtitle mdc-typography--subtitle2">by Kurt Wagner</h3>
9999
</section>
100100

101101
<section class="demo-card-collection">
102-
<div class="mdc-card mdc-card--stroked demo-card">
102+
<div class="mdc-card mdc-card--outlined demo-card">
103103
<div class="demo-card-article-group-heading mdc-typography--subtitle2">Headlines</div>
104104

105105
<hr class="mdc-list-divider">

demos/shape.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ <h2 class="mdc-typography--headline4">Stroked</h2>
8888
<h1 class="mdc-typography--headline3">Card</h1>
8989

9090
<div class="mdc-shape-container card-container">
91-
<div class="mdc-card mdc-card--stroked demo-card">
91+
<div class="mdc-card mdc-card--outlined demo-card">
9292
<a class="mdc-card__primary-action demo-card__primary-action" href="#">
9393
<div class="demo-card__row">
9494
<div class="mdc-card__media mdc-card__media--square demo-card__media"></div>

demos/shape.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262
.card-container {
6363
@include mdc-shape-angled-corner($mdc-theme-background, 24px, 4px);
64-
@include mdc-shape-angled-corner-stroke($mdc-card-stroke-width, $mdc-card-stroke-color);
64+
@include mdc-shape-angled-corner-stroke($mdc-card-outline-width, $mdc-card-outline-color);
6565
}
6666

6767
.demo-card {

packages/mdc-card/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ elements:
171171
CSS Class | Description
172172
--- | ---
173173
`mdc-card` | Mandatory, for the card element
174-
`mdc-card--stroked` | Removes the shadow and displays a hairline stroke instead
174+
`mdc-card--outlined` | Removes the shadow and displays a hairline outline instead
175175
`mdc-card__primary-action` | The main tappable area of the card. Typically contains most (or all) card content _except_ `mdc-card__actions`. Only applicable to cards that have a primary action that the main surface should trigger.
176176
`mdc-card__media` | Media area that displays a custom `background-image` with `background-size: cover`
177177
`mdc-card__media--square` | Automatically scales the media area's height to equal its width
@@ -190,6 +190,6 @@ CSS Class | Description
190190
Mixin | Description
191191
--- | ---
192192
`mdc-card-fill-color($color)` | Sets the fill color of a card
193-
`mdc-card-stroke($color, $thickness)` | Sets the color and thickness of a card's stroke (but does _not_ remove its shadow)
193+
`mdc-card-outline($color, $thickness)` | Sets the color and thickness of a card's outline (but does _not_ remove its shadow)
194194
`mdc-card-corner-radius($radius)` | Sets the corner radius of a card
195195
`mdc-card-media-aspect-ratio($x, $y)` | Maintains the given aspect ratio on a `mdc-card__media` subelement by dynamically scaling its height relative to its width

packages/mdc-card/_mixins.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
@include mdc-theme-prop(background-color, $color);
2525
}
2626

27-
@mixin mdc-card-stroke($color, $thickness: $mdc-card-stroke-width) {
27+
@mixin mdc-card-outline($color, $thickness: $mdc-card-outline-width) {
2828
border: $thickness solid mdc-theme-prop-value($color);
2929
}
3030

packages/mdc-card/_variables.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616

1717
@import "@material/theme/mixins";
1818

19-
$mdc-card-stroke-color: mix(mdc-theme-prop-value(on-surface), mdc-theme-prop-value(surface), 12%);
20-
$mdc-card-stroke-width: 1px;
19+
$mdc-card-outline-color: mix(mdc-theme-prop-value(on-surface), mdc-theme-prop-value(surface), 12%);
20+
$mdc-card-outline-width: 1px;

packages/mdc-card/mdc-card.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
@include mdc-card-container-layout_;
3131
}
3232

33-
.mdc-card--stroked {
33+
.mdc-card--outlined {
3434
@include mdc-elevation(0);
35-
@include mdc-card-stroke($mdc-card-stroke-color);
35+
@include mdc-card-outline($mdc-card-outline-color);
3636
}
3737

3838
//

0 commit comments

Comments
 (0)