generated from ryansonshine/typescript-npm-package-template
-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: copy the latest docu-notion-styles.css to output
Then it will be available to point to each site's docusaurus.config.js
- Loading branch information
Showing
3 changed files
with
92 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 60 additions & 58 deletions
118
src/css/notion-styles.css → src/css/docu-notion-styles.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,60 @@ | ||
/* Note, I haven't figure out how a Docusaurus app can actually include this, yet. | ||
So currently this has to be duplicated by the client. | ||
*/ | ||
|
||
/* Copied from | ||
https://github1s.com/NotionX/react-notion-x/blob/master/packages/react-notion-x/src/styles.css#L934 | ||
and | ||
https://github1s.com/NotionX/react-notion-x/blob/master/packages/react-notion-x/src/styles.css#L1063 | ||
*/ | ||
.notion-column { | ||
display: flex; | ||
flex-direction: column; | ||
padding-top: 12px; | ||
padding-bottom: 12px; | ||
} | ||
|
||
.notion-column > *:first-child { | ||
margin-top: 0; | ||
margin-left: 0; | ||
margin-right: 0; | ||
} | ||
|
||
.notion-column > *:last-child { | ||
margin-left: 0; | ||
margin-right: 0; | ||
margin-bottom: 0; | ||
} | ||
|
||
.notion-row { | ||
display: flex; | ||
overflow: hidden; | ||
width: 100%; | ||
max-width: 100%; | ||
} | ||
|
||
@media (max-width: 640px) { | ||
.notion-row { | ||
flex-direction: column; | ||
} | ||
|
||
.notion-row .notion-column { | ||
width: 100% !important; | ||
} | ||
|
||
.notion-row .notion-spacer { | ||
display: none; | ||
} | ||
} | ||
|
||
.notion-spacer { | ||
/* This matches the value in ColumnTransformer.ts */ | ||
width: calc(min(32px, 4vw)); | ||
} | ||
|
||
.notion-spacer:last-child { | ||
display: none; | ||
} | ||
/* End copied from NotionX */ | ||
/* This should be added to the docusaurus.config.js in order to show some notion things correctly. | ||
See the option: --css-output-directory | ||
See the docusaurus docs: https://docusaurus.io/docs/styling-layout | ||
See the use in the docu-notion-sample-site: https://github.com/sillsdev/docu-notion-sample-site/blob/main/docusaurus.config.js | ||
*/ | ||
|
||
/* Copied from | ||
https://github1s.com/NotionX/react-notion-x/blob/master/packages/react-notion-x/src/styles.css#L934 | ||
and | ||
https://github1s.com/NotionX/react-notion-x/blob/master/packages/react-notion-x/src/styles.css#L1063 | ||
*/ | ||
.notion-column { | ||
display: flex; | ||
flex-direction: column; | ||
padding-top: 12px; | ||
padding-bottom: 12px; | ||
} | ||
|
||
.notion-column > *:first-child { | ||
margin-top: 0; | ||
margin-left: 0; | ||
margin-right: 0; | ||
} | ||
|
||
.notion-column > *:last-child { | ||
margin-left: 0; | ||
margin-right: 0; | ||
margin-bottom: 0; | ||
} | ||
|
||
.notion-row { | ||
display: flex; | ||
overflow: hidden; | ||
width: 100%; | ||
max-width: 100%; | ||
} | ||
|
||
@media (max-width: 640px) { | ||
.notion-row { | ||
flex-direction: column; | ||
} | ||
|
||
.notion-row .notion-column { | ||
width: 100% !important; | ||
} | ||
|
||
.notion-row .notion-spacer { | ||
display: none; | ||
} | ||
} | ||
|
||
.notion-spacer { | ||
/* This matches the value in ColumnTransformer.ts */ | ||
width: calc(min(32px, 4vw)); | ||
} | ||
|
||
.notion-spacer:last-child { | ||
display: none; | ||
} | ||
/* End copied from NotionX */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters