Skip to content

Commit

Permalink
feat(button): Add overflow ellipsis mixin (#5352)
Browse files Browse the repository at this point in the history
* feat(button): Add overflow ellipsis mixin

* WIP try to fix flaky tests

* WIP json is dumb
  • Loading branch information
patrickrodee authored Dec 18, 2019
1 parent a95be81 commit 47949b0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
9 changes: 9 additions & 0 deletions packages/mdc-button/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,15 @@ $query: mdc-feature-all()) {
}
}

///
/// Sets the button label to overflow as ellipsis
///
@mixin mdc-button-label-overlow-ellipsis($query: mdc-feature-all()) {
.mdc-button__label {
@include mdc-typography-overflow-ellipsis($query: $query);
}
}

@mixin mdc-button-base_($query) {
$feat-color: mdc-feature-create-target($query, color);
$feat-structure: mdc-feature-create-target($query, structure);
Expand Down
3 changes: 2 additions & 1 deletion test/screenshot/diffing.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,8 @@
],
"url_regex_patterns": [
"mdc-menu/classes/menu-selection-group-only.html",
"mdc-menu/classes/menu-selection-group.html"
"mdc-menu/classes/menu-selection-group.html",
"mdc-menu/classes/multiple-menu-selection-group.html"
],
"custom_config": {
"fonts_loaded_reflow_delay_ms": 250
Expand Down
1 change: 1 addition & 0 deletions test/scss/_feature-targeting-test.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
@include mdc-button-theme-baseline($query: $query);
@include mdc-button-density(-1, $query: $query);
@include mdc-button-height(0, $query: $query);
@include mdc-button-label-overlow-ellipsis($query: $query);

// Card
@include mdc-card-core-styles($query: $query);
Expand Down

0 comments on commit 47949b0

Please sign in to comment.