Skip to content

Commit 83af86b

Browse files
committed
feat(ui-shell): support theming
Closes #2457
1 parent 089fb86 commit 83af86b

11 files changed

Lines changed: 850 additions & 237 deletions

css/_ui-shell.scss

Lines changed: 842 additions & 3 deletions
Large diffs are not rendered by default.

css/all.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/g10.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/g100.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/g80.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/g90.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/white.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/UIShell/HeaderAction.svelte

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@
7171
7272
$: hasIconOnly = iconDescription && !(text || $$slots.textChildren);
7373
$: buttonClass = [
74-
hasIconOnly && "bx--btn bx--btn--primary",
74+
hasIconOnly && "bx--btn",
7575
hasIconOnly && "bx--tooltip__trigger bx--tooltip--a11y",
76-
hasIconOnly && "bx--btn--icon-only bx--btn--icon-only--bottom",
76+
hasIconOnly && "bx--btn--icon-only--bottom",
7777
hasIconOnly && `bx--tooltip--align-${tooltipAlignment}`,
7878
$$restProps.class,
7979
]
@@ -140,26 +140,3 @@
140140
<slot />
141141
</div>
142142
{/if}
143-
144-
<style>
145-
:global(.bx--header__action--text) {
146-
display: inline-flex;
147-
align-items: center;
148-
width: auto;
149-
150-
/** 2px bottom padding aligns icon with `HeaderAction` */
151-
padding: 0 1rem 2px 1rem;
152-
153-
/** `body-short-01` styles */
154-
font-size: 0.875rem;
155-
line-height: 1.28572;
156-
letter-spacing: 0.16px;
157-
158-
/** Same color as `Header` platformName */
159-
color: #f4f4f4;
160-
}
161-
162-
:global(.bx--header__action-text) {
163-
margin-left: 0.75rem;
164-
}
165-
</style>

src/UIShell/HeaderActionLink.svelte

Lines changed: 0 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -33,57 +33,3 @@
3333
>
3434
<slot name="icon"><svelte:component this={icon} size={20} /></slot>
3535
</a>
36-
37-
<style>
38-
:global(.bx--header__global .bx--header__action) {
39-
display: flex;
40-
flex-shrink: 0;
41-
align-items: center;
42-
justify-content: center;
43-
box-sizing: border-box;
44-
min-width: 3rem;
45-
min-height: 3rem;
46-
/** Hot fix to align icon with `HeaderAction` */
47-
padding-bottom: 2px;
48-
}
49-
50-
:global(.bx--header__global a.bx--header__action),
51-
:global(
52-
.bx--header__global
53-
button.bx--header__action:not(.bx--header-search-button)
54-
) {
55-
position: relative;
56-
text-decoration: none;
57-
color: inherit;
58-
transition:
59-
background-color 110ms,
60-
border-color 110ms;
61-
border: 0.0625rem solid rgba(0, 0, 0, 0);
62-
background-color: transparent;
63-
}
64-
65-
:global(.bx--header__global a.bx--header__action:hover),
66-
:global(
67-
.bx--header__global
68-
button.bx--header__action:not(.bx--header-search-button):hover
69-
) {
70-
background-color: #353535;
71-
}
72-
73-
:global(.bx--header__global a.bx--header__action:focus),
74-
:global(
75-
.bx--header__global
76-
button.bx--header__action:not(.bx--header-search-button):focus
77-
) {
78-
border-color: #fff;
79-
outline: none;
80-
}
81-
82-
:global(.bx--header__global a.bx--header__action:active),
83-
:global(
84-
.bx--header__global
85-
button.bx--header__action:not(.bx--header-search-button):active
86-
) {
87-
background-color: #393939;
88-
}
89-
</style>

src/UIShell/HeaderPanelDivider.svelte

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,3 @@
22
<li class:bx--header-panel-divider={true}><slot /></li>
33
{/if}
44
<hr class:bx--switcher__item--divider={true}>
5-
6-
<style>
7-
/**
8-
* Carbon does not support a divider with a subject.
9-
* We apply custom styles using the switcher subject divider
10-
* from https://carbondesignsystem.com/ as a reference.
11-
*/
12-
13-
:global(.bx--header-panel-divider) {
14-
margin: 2rem 1rem 0;
15-
font-size: 0.75rem;
16-
line-height: 1.3;
17-
letter-spacing: 0.02rem;
18-
color: #c6c6c6;
19-
}
20-
</style>

0 commit comments

Comments
 (0)