Skip to content

Commit ec4af22

Browse files
committed
docs: add css property
1 parent 5366534 commit ec4af22

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

docs/docs/changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ tags:
99

1010
### <!-- md:version stable- --> 1.6.3 <small>April 01, 2024</small> { id="1.6.3" }
1111

12+
- `feat`: added property `css` for **raw mode**
13+
- `change`: added documentation link to Gistr settings support tab
1214
- `change`: uuid for gists now generated by in-house method instead of nanoid
1315
- `dep`: update rollup 3.29.3 -> 4.13.2
1416
- `dep`: added `@rollup/plugin-replace`

docs/docs/usage/properties.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,46 @@ The default value is `1` which equals `100%`. If you would like to use `50%`, th
356356
<!-- md:version stable-1.6.0 -->
357357
<!-- md:default `600` -->
358358

359+
The `css` property allows you to override any website's default CSS.
360+
361+
````
362+
```gistr
363+
url: https://gist.github.com/Aetherinox/f7525990fba2cba6a3ee7b61ac626c21
364+
raw: true
365+
zoom: 0.8
366+
height: 500
367+
css: |
368+
body { background-color: #FFF !important; }
369+
h1 { font-size: 60pt !important; color: #000 !important; }
370+
```
371+
````
372+
373+
<br />
374+
375+
The above example will force all `h1` headers to use a larger font size, and change the text color to black, as well as make the entire website background color white.
376+
377+
CSS rules can be on their own lines, or all-together:
378+
379+
````
380+
```gistr
381+
url: https://gist.github.com/Aetherinox/f7525990fba2cba6a3ee7b61ac626c21
382+
raw: true
383+
css: body { background-color: #FFF !important; }
384+
```
385+
````
386+
387+
!!! important "Overriding CSS"
388+
389+
Certain websites such as Github utilize the [!important](https://www.w3schools.com/css/css_important.asp) property on quite a few CSS rules.
390+
391+
You must use `!important` at the end of your property to attempt overriding Github's rule.
392+
393+
<br />
394+
395+
#### Property: CSS
396+
<!-- md:version stable-1.6.3 -->
397+
<!-- md:default `none` -->
398+
359399
The `height` property allows you to specify how tall the window will be within your Obsidian note. If you do not specify a custom height, then it will default to `600`, which represents 600 **pixels**.
360400

361401
<br />

docs/docs/usage/raw-mode.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ Along with specifying `raw`, you also have access to the properties:
4848
| --- | --- |
4949
| [zoom](../usage/properties.md#property-zoom) | _**(Raw Mode Only)**_: Determines how big the content and text will appear in the gist window. Default value: `1`. 50% would be `0.5`|
5050
| [height](../usage/properties.md#property-height) | _**(Raw Mode Only)**_: Specify the height of the window when displaying a gist. |
51+
| [css](../usage/properties.md#property-css) | _**(Raw Mode Only)**_: Allows you to override a targeted website's default css |
5152

5253
<br />
5354

0 commit comments

Comments
 (0)