Skip to content

Commit af0edde

Browse files
authored
fix(sidenav): remove temporary custom tokens (#2256)
1 parent aae1386 commit af0edde

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

components/sidenav/index.css

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ governing permissions and limitations under the License.
3636
--spectrum-sidenav-start-to-content-with-icon-second-level: var(--spectrum-side-navigation-with-icon-second-level-edge-to-text);
3737
--spectrum-sidenav-start-to-content-with-icon-third-level: var(--spectrum-side-navigation-with-icon-third-level-edge-to-text);
3838

39+
--spectrum-sidenav-heading-top-margin: var(--spectrum-side-navigation-item-to-header);
40+
--spectrum-sidenav-heading-bottom-margin: var(--spectrum-side-navigation-header-to-item);
41+
3942
/* color - background */
4043
--spectrum-sidenav-background-disabled: transparent;
4144
--spectrum-sidenav-background-default: transparent;
@@ -182,10 +185,10 @@ governing permissions and limitations under the License.
182185
}
183186

184187
.spectrum-Icon {
185-
inline-size: var(--spectrum-sidenav-icon-size);
186-
block-size: var(--spectrum-sidenav-icon-size);
187-
margin-inline-end: var(--spectrum-sidenav-icon-spacing);
188-
margin-block-start: var(--spectrum-sidenav-top-to-icon);
188+
inline-size: var(--mod-sidenav-icon-size, var(--spectrum-sidenav-icon-size));
189+
block-size: var(--mod-sidenav-icon-size, var(--spectrum-sidenav-icon-size));
190+
margin-inline-end: var(--mod-sidenav-icon-spacing, var(--spectrum-sidenav-icon-spacing));
191+
margin-block-start: var(--mod-sidenav-top-to-icon, var(--spectrum-sidenav-top-to-icon));
189192
flex-shrink: 0;
190193
}
191194

@@ -212,8 +215,8 @@ governing permissions and limitations under the License.
212215
}
213216

214217
.spectrum-SideNav-heading {
215-
margin-block-start: calc(var(--spectrum-sidenav-heading-top-margin) - var(--spectrum-sidenav-gap));
216-
margin-block-end: var(--spectrum-sidenav-heading-bottom-margin);
218+
margin-block-start: calc(var(--mod-sidenav-heading-top-margin, var(--spectrum-sidenav-heading-top-margin)) - var(--mod-sidenav-gap, var(--spectrum-sidenav-gap)));
219+
margin-block-end: var(--mod-sidenav-heading-bottom-margin, var(--spectrum-sidenav-heading-bottom-margin));
217220
padding-inline: var(--mod-sidenav-inline-padding, var(--spectrum-sidenav-inline-padding));
218221
color: var(--mod-sidenav-header-color, var(--spectrum-sidenav-header-color));
219222
font-size: var(--mod-sidenav-header-font-size, var(--spectrum-sidenav-header-font-size));

components/sidenav/metadata/mods.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
| `--mod-sidenav-header-font-style` |
2727
| `--mod-sidenav-header-font-weight` |
2828
| `--mod-sidenav-header-line-height` |
29+
| `--mod-sidenav-heading-bottom-margin` |
30+
| `--mod-sidenav-heading-top-margin` |
31+
| `--mod-sidenav-icon-size` |
32+
| `--mod-sidenav-icon-spacing` |
2933
| `--mod-sidenav-inline-padding` |
3034
| `--mod-sidenav-item-background-default-selected` |
3135
| `--mod-sidenav-item-background-down` |
@@ -47,5 +51,6 @@
4751
| `--mod-sidenav-top-level-font-style` |
4852
| `--mod-sidenav-top-level-font-weight` |
4953
| `--mod-sidenav-top-level-line-height` |
54+
| `--mod-sidenav-top-to-icon` |
5055
| `--mod-sidenav-top-to-label` |
5156
| `--mod-sidenav-width` |

components/tokens/custom-spectrum/custom-large-vars.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ governing permissions and limitations under the License.
5959
--spectrum-alert-banner-edge-to-button: var(--spectrum-spacing-200);
6060
--spectrum-alert-banner-text-to-button-vertical: var(--spectrum-spacing-200);
6161

62-
--spectrum-sidenav-heading-top-margin: 30px; /* TODO replace with var(--spectrum-side-navigation-item-to-header); once token is updated */
63-
--spectrum-sidenav-heading-bottom-margin: 10px; /* TODO replace with var(--spectrum-side-navigation-item-to-header); once token is added */
64-
--spectrum-sidenav-bottom-to-label: 10px; /* TODO replace with updated var(--spectrum-component-bottom-to-text-100); */
65-
6662
--spectrum-alert-dialog-padding: var(--spectrum-spacing-400);
6763
--spectrum-alert-dialog-description-to-buttons: var(--spectrum-spacing-600);
6864

components/tokens/custom-spectrum/custom-medium-vars.css

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ governing permissions and limitations under the License.
5959
--spectrum-alert-banner-edge-to-button: var(--spectrum-spacing-100);
6060
--spectrum-alert-banner-text-to-button-vertical: var(--spectrum-spacing-100);
6161

62-
--spectrum-sidenav-heading-top-margin: 24px; /* TODO replace with var(--spectrum-side-navigation-item-to-header); once token is updated */
63-
--spectrum-sidenav-heading-bottom-margin: 8px; /* TODO replace with var(--spectrum-side-navigation-item-to-header); once token is added */
64-
--spectrum-sidenav-bottom-to-label: 8px; /* TODO replace with updated var(--spectrum-component-bottom-to-text-100); */
65-
6662
--spectrum-alert-dialog-padding: var(--spectrum-spacing-500);
6763
--spectrum-alert-dialog-description-to-buttons: var(--spectrum-spacing-700);
6864

0 commit comments

Comments
 (0)