Skip to content

Commit 47112bc

Browse files
authored
chore(theme/CodeBlock): add box-shadow to codeblock (#2863)
1 parent d938835 commit 47112bc

File tree

6 files changed

+9
-4
lines changed

6 files changed

+9
-4
lines changed

packages/core/src/theme/components/CodeBlock/index.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
position: relative;
33
margin: 16px 0;
44
border: var(--rp-code-block-border);
5+
box-shadow: var(--rp-code-block-shadow);
6+
57
overflow-x: auto;
68
transition: none;
79
border-radius: var(--rp-radius);

packages/core/src/theme/components/DocContent/doc.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@
184184
border-collapse: separate;
185185
border-spacing: 0;
186186

187-
border: 1px solid var(--rp-c-divider-light);
187+
border: var(--rp-code-block-border);
188188
border-radius: var(--rp-radius);
189189
overflow: hidden;
190190

packages/core/src/theme/components/HoverGroup/index.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
border-radius: 8px;
1515
border: var(--rp-code-block-border);
1616
background: var(--rp-c-bg);
17-
box-shadow: 0px 4px 16px 0px rgba(0, 0, 0, 0.04);
17+
box-shadow: var(--rp-shadow-2);
1818
transition: opacity 0.3s ease-in-out;
1919

2020
position: absolute;

packages/core/src/theme/components/Tabs/index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
border-radius: var(--rp-radius);
44
margin: 1rem 0;
55
border: var(--rp-code-block-border);
6+
box-shadow: var(--rp-code-block-shadow);
67

78
.rp-codeblock {
89
margin: 0 !important;

packages/core/src/theme/styles/vars/base-vars.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@
5252
--rp-c-gray-light-4: #e5e5e5;
5353
--rp-c-gray-light-5: #f2f2f2;
5454

55-
--rp-shadow-1: 0 1px 4px rgba(0, 0, 0, 0.02), 0 1px 0 rgba(0, 0, 0, 0.06);
56-
--rp-shadow-2: 0 3px 12px rgba(0, 0, 0, 0.07), 0 1px 4px rgba(0, 0, 0, 0.07);
55+
--rp-shadow-1: 0 1px 2px rgba(0, 0, 0, 0.02), 0 1px 0 rgba(0, 0, 0, 0.06);
56+
--rp-shadow-2: 0 3px 12px rgba(0, 0, 0, 0.06), 0 1px 4px rgba(0, 0, 0, 0.07);
5757
--rp-shadow-3: 0 12px 32px rgba(0, 0, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.08);
5858
--rp-shadow-4: 0 14px 44px rgba(0, 0, 0, 0.12), 0 3px 9px rgba(0, 0, 0, 0.12);
5959
--rp-shadow-5:

packages/core/src/theme/styles/vars/code-vars.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
--rp-code-block-bg: var(--rp-c-bg);
88

99
--rp-code-block-border: 1px solid var(--rp-c-divider-light);
10+
--rp-code-block-shadow: var(--rp-shadow-1);
1011
}
1112

1213
/* Dark Mode */
@@ -18,4 +19,5 @@
1819
--rp-code-block-bg: var(--rp-c-bg);
1920

2021
--rp-code-block-border: 1px solid var(--rp-c-divider-light);
22+
--rp-code-block-shadow: var(--rp-shadow-1);
2123
}

0 commit comments

Comments
 (0)