Skip to content

Commit c204b93

Browse files
authored
docs(sb): disable forced-color-adjust & update styles (SAP#6555)
This PR also styles the search input to look more like a Horizon input and improves some general styles. Related to SAP/ui5-webcomponents#9917
1 parent d432c5e commit c204b93

File tree

2 files changed

+40
-3
lines changed

2 files changed

+40
-3
lines changed

.storybook/manager-head.html

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,41 @@
11
<style>
22
@import url('@ui5/webcomponents-base/dist/css/FontFace.css');
33

4+
html {
5+
forced-color-adjust: none;
6+
}
47
body {
5-
font-family: '72', Arial, Helvetica, sans-serif;
8+
font-family: var(--sapFontFamily);
69
}
710
#storybook-explorer-searchfield {
8-
background: transparent !important;
11+
font-size: var(--sapFontSize);
12+
box-sizing: border-box;
13+
border: 0;
14+
white-space: nowrap;
15+
text-overflow: ellipsis;
16+
height: var(--sapElement_Height);
17+
min-height: var(--sapElement_Height);
18+
border-radius: var(--sapField_BorderCornerRadius);
19+
padding-inline-end: 0.625rem;
20+
box-shadow: var(--sapField_Shadow);
21+
color: var(--sapField_TextColor);
22+
background: var(--sapField_BackgroundStyle, var(--sapField_BackgroundStyle));
23+
background-color: var(--sapField_Background, var(--sapField_Background));
24+
border: var(--sapField_BorderWidth) var(--sapField_BorderStyle) var(--sapField_BorderColor);
25+
}
26+
27+
#storybook-explorer-searchfield:hover {
28+
background: var(--sapField_Hover_BackgroundStyle, var(--sapField_Hover_BackgroundStyle));
29+
background-color: var(--sapField_Hover_Background, var(--sapField_Hover_Background));
30+
border-color: var(--sapField_Hover_BorderColor);
31+
box-shadow: var(--sapField_Hover_Shadow);
32+
}
33+
34+
#storybook-explorer-searchfield:focus {
35+
background: var(--sapField_Focus_Background, var(--sapField_Focus_Background));
36+
outline: var(--sapField_Active_BorderColor) var(--sapContent_FocusStyle) var(--sapContent_FocusWidth);
37+
outline-offset: -0.125rem;
38+
box-shadow: none;
939
}
1040

1141
.docblock-argstable-body label[title] {

.storybook/preview-head.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
<style>
2+
html[data-sap-theme]:not([data-sap-theme*='hc']),
3+
/*fallback*/
4+
html:not([data-sap-theme]) {
5+
forced-color-adjust: none;
6+
}
7+
28
body {
39
font-family: var(--sapFontFamily);
10+
color: var(--sapTextColor);
411
background-color: var(--sapBackgroundColor);
512
}
613

@@ -69,7 +76,7 @@
6976
}
7077

7178
.dynamicPageStickyContent::part(fit-content) {
72-
position: static;
79+
position: static;
7380
}
7481

7582
/* TODO remove this workaround as soon as https://github.com/storybookjs/storybook/issues/20497 is fixed */

0 commit comments

Comments
 (0)