-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(antdsite): add highlight line number and show line number of mar…
…kdown extensions.
- Loading branch information
1 parent
89ad451
commit dd8029b
Showing
8 changed files
with
262 additions
and
29 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
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
9 changes: 0 additions & 9 deletions
9
packages/antdsite/src/default-theme/assets/custom-md-block.less
This file was deleted.
Oops, something went wrong.
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
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
60 changes: 60 additions & 0 deletions
60
packages/antdsite/src/default-theme/assets/markdown-extension.less
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 |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/** | ||
* -------------------------------- | ||
* Custom markdown block | ||
* -------------------------------- | ||
*/ | ||
|
||
.md-alert.ant-alert { | ||
.ant-alert-description { | ||
p { | ||
margin: 0.3rem 0; | ||
} | ||
} | ||
|
||
margin-bottom: 16px; | ||
} | ||
|
||
/** | ||
* -------------------------------- | ||
* Highlight code line | ||
* -------------------------------- | ||
*/ | ||
|
||
.gatsby-highlight-code-line { | ||
background-color: rgba(0, 0, 0, 0.66); | ||
display: block; | ||
margin-right: -1em; | ||
margin-left: -1em; | ||
padding-right: 1em; | ||
padding-left: 0.75em; | ||
} | ||
|
||
/** | ||
* -------------------------------- | ||
* Line Numbers | ||
* -------------------------------- | ||
*/ | ||
|
||
// Adjust the position of the line numbers | ||
.gatsby-highlight pre[class*='language-'].line-numbers { | ||
padding-left: 2.8em; | ||
} | ||
|
||
// If you only want to use line numbering | ||
.gatsby-highlight { | ||
border-radius: 0.3em; | ||
} | ||
.gatsby-highlight pre[class*='language-'].line-numbers { | ||
padding-left: 1.8em; | ||
overflow: auto; | ||
} | ||
.line-numbers .line-numbers-rows { | ||
border: none; | ||
} | ||
.line-numbers-rows > span:before { | ||
padding-right: 0.4rem; | ||
padding-left: 0.4rem; | ||
} | ||
.line-numbers .line-numbers-rows { | ||
padding-top: 1em; | ||
} |
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
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