Skip to content

Commit

Permalink
Add Box--overlay styles + remove styleguide.css from docs (#1754)
Browse files Browse the repository at this point in the history
* Remove styleguide.css

* Move Box--overlay from dotcom

* Lint

* Create orange-crabs-provide.md
  • Loading branch information
simurai authored Nov 16, 2021
1 parent f824581 commit 3838e17
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/orange-crabs-provide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@primer/css": minor
---

Add `Box--overlay` styles
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ function LivePreviewWrapper({children}) {

return (
<Frame>
<link rel="stylesheet" href="https://github.com/site/assets/styleguide.css" />
<style>{primerStyles}</style>
<div data-color-mode={colorMode} data-light-theme="light" data-dark-theme="dark">
<Flex pt={2} px={2} justifyContent="flex-end">
Expand Down
1 change: 0 additions & 1 deletion docs/src/color-system.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import Table from './table'
function LivePreviewWrapper({children}) {
return (
<Frame>
<link rel="stylesheet" href="https://github.com/site/assets/styleguide.css" />
<style>{primerStyles}</style>
<Flex direction="row">
<div data-color-mode="light" data-light-theme="light" style={{flex: 1}}>
Expand Down
40 changes: 40 additions & 0 deletions src/box/box-overlay.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
.Box--overlay {
width: 448px;
margin-right: auto;
margin-left: auto;
background-color: var(--color-canvas-default);
background-clip: padding-box;
border-color: var(--color-border-default);
// stylelint-disable-next-line primer/box-shadow
box-shadow: 0 0 18px rgba(0, 0, 0, 0.4);

.Box-header {
margin: 0;
border-width: 0;
border-bottom-width: $border-width;
border-top-left-radius: $border-radius;
border-top-right-radius: $border-radius;
}
}

.Box-overlay--narrow {
width: 320px;
}

.Box-overlay--wide {
width: 640px;
}

.Box-body {
&.scrollable-overlay {
max-height: 400px;
overflow-y: scroll;
}

.help {
padding-top: $spacer-2;
margin: 0;
color: var(--color-fg-muted);
text-align: center;
}
}
1 change: 1 addition & 0 deletions src/box/index.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
@import '../support/index.scss';
@import './box.scss';
@import './box-overlay.scss';

0 comments on commit 3838e17

Please sign in to comment.