Skip to content

Commit

Permalink
MDCMigration: Style Settings button and Plugin picker for MDC migrati…
Browse files Browse the repository at this point in the history
…on. (#6618)

Style the "settings" button and the "scalars | images | histograms"
plugin chooser button.

We can do this by adjusting the global styles we recently introduced,
meaning that other buttons we add in the future will also adhere to
these styles:
1. Set letter-spacing to normal for all button text.
2. Reuse the .mat-icon styling we introduced even for non icon-button
buttons.

Sample screenshot:

![image](https://github.com/tensorflow/tensorboard/assets/17152369/23c3ecda-93d3-4c73-8774-03379e2f802c)
  • Loading branch information
bmd3k authored Oct 5, 2023
1 parent 5663200 commit c640857
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions tensorboard/webapp/theme/_tb_theme.template.scss
Original file line number Diff line number Diff line change
Expand Up @@ -294,30 +294,32 @@ $tb-dark-theme: map_merge(
body,
body.dark-mode {
a,
button {
button.mat-mdc-button-base {
--tb-icon-size: 24px;
--mdc-typography-button-letter-spacing: normal;

&[mat-icon-button].mat-mdc-icon-button {
width: 40px;
height: 40px;
display: inline-flex;
justify-content: center;
align-items: center;
--tb-icon-size: 24px;

.mat-mdc-button-touch-target {
height: 100%;
width: 100%;
}
}

mat-icon.mat-icon {
flex-shrink: 0;
}
mat-icon.mat-icon {
flex-shrink: 0;
}

mat-icon.mat-icon,
svg {
width: var(--tb-icon-size);
height: var(--tb-icon-size);
line-height: var(--tb-icon-size);
}
mat-icon.mat-icon,
svg {
width: var(--tb-icon-size);
height: var(--tb-icon-size);
line-height: var(--tb-icon-size);
}
}
}
Expand Down

0 comments on commit c640857

Please sign in to comment.