mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2024-11-27 01:33:04 +00:00
notice: fix styling for Markdown code boxes #906
This commit is contained in:
parent
86fa3c70f2
commit
1858bf48a3
2 changed files with 16 additions and 14 deletions
|
@ -313,27 +313,29 @@ Just a box
|
||||||
#### Code with Collapsed Colored Borders
|
#### Code with Collapsed Colored Borders
|
||||||
|
|
||||||
````
|
````
|
||||||
```c
|
> [!orange]
|
||||||
// Normal code:
|
> ```c
|
||||||
printf( "Hello world\n" )
|
> // With colored border in Markdown syntax
|
||||||
```
|
> printf( "Hello world\n" )
|
||||||
|
> ```
|
||||||
|
|
||||||
{{%/* notice style="red" title="" */%}}
|
{{%/* notice style="red" */%}}
|
||||||
```c
|
```c
|
||||||
// With colored border
|
// With colored border in Shortcode syntax
|
||||||
printf( "Hello world\n" )
|
printf( "Hello world\n" )
|
||||||
```
|
```
|
||||||
{{%/* /notice */%}}
|
{{%/* /notice */%}}
|
||||||
````
|
````
|
||||||
|
|
||||||
```c
|
> [!orange]
|
||||||
// Normal code:
|
> ```c
|
||||||
printf( "Hello world\n" )
|
> // With colored border in Markdown syntax
|
||||||
```
|
> printf( "Hello world\n" )
|
||||||
|
> ```
|
||||||
|
|
||||||
{{% notice style="red" title="" %}}
|
{{% notice style="red" %}}
|
||||||
```c
|
```c
|
||||||
// With colored border
|
// With colored border in Shortcode syntax
|
||||||
printf( "Hello world\n" )
|
printf( "Hello world\n" )
|
||||||
```
|
```
|
||||||
{{% /notice %}}
|
{{% /notice %}}
|
||||||
|
|
|
@ -722,11 +722,11 @@ div.box > .box-content {
|
||||||
padding-right: 1rem;
|
padding-right: 1rem;
|
||||||
}
|
}
|
||||||
/* remove margin if only a single code block is contained in the tab */
|
/* remove margin if only a single code block is contained in the tab */
|
||||||
#R-body .box-content:has(> div.highlight:only-child){
|
#R-body .box-content:has(> div.highlight:only-of-type){
|
||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
/* remove border from a code block if single */
|
/* remove border from a code block if single */
|
||||||
#R-body .box-content > div.highlight:only-child > pre{
|
#R-body .box-content > div.highlight:only-of-type > pre{
|
||||||
border: 0;
|
border: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue