Skip to content

Commit 69e110e

Browse files
committed
Documentation: Add more example presentations for infocard and css
1 parent 02d7b0c commit 69e110e

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed

docs/css_classes.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,41 @@ Larger text.
3232
:::
3333

3434

35+
## Table styling
36+
37+
The `.{top,bottom}-border` CSS classes adjust the `border-{top,bottom}-{width,style,color}`
38+
CSS attributes. They are meant to be applied to rows in a [](gridtable-directive) by using
39+
its `:row-class:` directive option.
40+
41+
:::::{card}
42+
::::{sd-table}
43+
:widths: 3 9
44+
:row-class: top-border
45+
46+
:::{sd-row}
47+
```{sd-item} **What**
48+
```
49+
```{sd-item} **Description**
50+
```
51+
:::
52+
:::{sd-row}
53+
```{sd-item} Fox
54+
```
55+
```{sd-item}
56+
The quick brown fox jumps
57+
over the lazy dog.
58+
```
59+
:::
60+
:::{sd-row}
61+
```{sd-item} Franz
62+
```
63+
```{sd-item}
64+
Franz jagt im komplett verwahrlosten
65+
Taxi quer durch Bayern.
66+
```
67+
:::
68+
69+
::::
70+
:::::
71+
3572
[`compiled/style.css`]: https://github.com/panodata/sphinx-design-elements/blob/main/sphinx_design_elements/compiled/style.css

docs/infocard.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,46 @@ badges](inv:sd#badges) with a special appearance.
6666
````
6767

6868

69+
## More examples
70+
71+
:::::{info-card}
72+
73+
::::{grid-item}
74+
:columns: 8
75+
:class: sd-align-major-spaced
76+
#### Curated picture of the day
77+
78+
A mountain goat with long horns standing on a grassy hill.
79+
80+
:::{div} text-small
81+
**Author:** Jaromír Kalina, [@jkalinaofficial](https://unsplash.com/@jkalinaofficial) \
82+
**Contact:** Czech Republic, <https://jkalina.carrd.co/> \
83+
**Exposé:** https://unsplash.com/photos/spdQ1dVuIHw \
84+
**Source:** [Unsplash -- The internet’s source for visuals](https://unsplash.com/)
85+
:::
86+
::::
87+
88+
::::{grid-item}
89+
:columns: 4
90+
91+
[![](https://unsplash.com/photos/spdQ1dVuIHw/download?ixid=M3wxMjA3fDB8MXxhbGx8fHx8fHx8fHwxNjg5Nzg4MTEzfA&force=true&w=640)](https://unsplash.com/photos/spdQ1dVuIHw)
92+
::::
93+
94+
:::::
95+
96+
:::{note}
97+
Did you ever ask yourself how to [align items in a flex container], and how to control
98+
all those details within Sphinx documentation markup? The documentation about
99+
[using sphinx{design} CSS classes to align flexbox items] has all the answers.
100+
In this case, the items within the left content column are aligned "spaced", to fill the
101+
full major axis, using the `sd-align-major-spaced` CSS class.
102+
:::
103+
104+
69105
---
70106

71107
_This page is written in Markedly Structured Text (MyST Markdown)._
108+
109+
110+
[align items in a flex container]: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_flexible_box_layout/Aligning_items_in_a_flex_container
111+
[using sphinx{design} CSS classes to align flexbox items]: https://sphinx-design.readthedocs.io/en/latest/css_classes.html#display

0 commit comments

Comments
 (0)