Skip to content

Commit 3838e17

Browse files
authored
Add Box--overlay styles + remove styleguide.css from docs (#1754)
* Remove styleguide.css * Move Box--overlay from dotcom * Lint * Create orange-crabs-provide.md
1 parent f824581 commit 3838e17

File tree

5 files changed

+46
-2
lines changed

5 files changed

+46
-2
lines changed

.changeset/orange-crabs-provide.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@primer/css": minor
3+
---
4+
5+
Add `Box--overlay` styles

docs/src/@primer/gatsby-theme-doctocat/components/live-preview-wrapper.js

-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ function LivePreviewWrapper({children}) {
2222

2323
return (
2424
<Frame>
25-
<link rel="stylesheet" href="https://github.com/site/assets/styleguide.css" />
2625
<style>{primerStyles}</style>
2726
<div data-color-mode={colorMode} data-light-theme="light" data-dark-theme="dark">
2827
<Flex pt={2} px={2} justifyContent="flex-end">

docs/src/color-system.js

-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import Table from './table'
1111
function LivePreviewWrapper({children}) {
1212
return (
1313
<Frame>
14-
<link rel="stylesheet" href="https://github.com/site/assets/styleguide.css" />
1514
<style>{primerStyles}</style>
1615
<Flex direction="row">
1716
<div data-color-mode="light" data-light-theme="light" style={{flex: 1}}>

src/box/box-overlay.scss

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.Box--overlay {
2+
width: 448px;
3+
margin-right: auto;
4+
margin-left: auto;
5+
background-color: var(--color-canvas-default);
6+
background-clip: padding-box;
7+
border-color: var(--color-border-default);
8+
// stylelint-disable-next-line primer/box-shadow
9+
box-shadow: 0 0 18px rgba(0, 0, 0, 0.4);
10+
11+
.Box-header {
12+
margin: 0;
13+
border-width: 0;
14+
border-bottom-width: $border-width;
15+
border-top-left-radius: $border-radius;
16+
border-top-right-radius: $border-radius;
17+
}
18+
}
19+
20+
.Box-overlay--narrow {
21+
width: 320px;
22+
}
23+
24+
.Box-overlay--wide {
25+
width: 640px;
26+
}
27+
28+
.Box-body {
29+
&.scrollable-overlay {
30+
max-height: 400px;
31+
overflow-y: scroll;
32+
}
33+
34+
.help {
35+
padding-top: $spacer-2;
36+
margin: 0;
37+
color: var(--color-fg-muted);
38+
text-align: center;
39+
}
40+
}

src/box/index.scss

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
@import '../support/index.scss';
22
@import './box.scss';
3+
@import './box-overlay.scss';

0 commit comments

Comments
 (0)