Skip to content

Commit

Permalink
chore(demo): use @taiga-ui/addon-doc/styles/markdown (#780)
Browse files Browse the repository at this point in the history
  • Loading branch information
nsbarsukov authored Dec 18, 2023
1 parent a89e726 commit 482726f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 102 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,6 @@ markdown {
margin-left: 1.25rem;
}

& h2 {
font-size: 2em;
padding-bottom: 0.5em;
margin-left: 0;
border-bottom: 1px solid var(--tui-base-03);
}

& h3 {
text-transform: uppercase;
font-weight: normal;
font-size: 1.5rem;
margin: 1rem 0;
}

& h3:not([id^='feat']):not([id^='bug']):not([id^='deprecations']) {
font-size: 1.75rem;
padding-bottom: 0.5em;
Expand All @@ -36,10 +22,6 @@ markdown {
color: var(--tui-error-fill);
}

& code {
color: #d45d8c;
}

& h3[id^='feat']:before {
content: '🚀';
}
Expand Down
93 changes: 9 additions & 84 deletions projects/demo/src/styles.less
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import '@taiga-ui/styles/taiga-ui-global';
@import '@taiga-ui/addon-doc/styles/markdown';

body {
margin: 0;
Expand All @@ -10,93 +11,17 @@ body {
}

markdown {
display: block;

h1 {
font: var(--tui-font-heading-1);
}

h2 {
font: var(--tui-font-heading-2);
}

h3 {
font: var(--tui-font-heading-3);
}

h4 {
font: var(--tui-font-heading-4);
}

h5 {
font: var(--tui-font-heading-5);
}

h6 {
font: var(--tui-font-heading-6);
}

h1,
h2,
h3,
h4,
h5,
h6 {
margin: 3rem 0 1rem;
}

img {
margin: 0.625rem 3rem 1.5rem 0;
max-width: 27.5rem;

&:nth-child(2n) {
margin-right: 0;
}
}

ul {
&:extend(.tui-list);
}

li {
position: relative;
padding-left: 1.5rem;
word-wrap: break-word;
margin-top: 0.75rem;
li li {
// nested list
color: var(--tui-text-02);

&:before {
content: '';
position: absolute;
content: '\2014';
left: 0;
top: 0.5rem;
width: 0.5rem;
height: 0.5rem;
border-radius: 100%;
background-color: var(--tui-primary);
}

// nested list
li {
color: var(--tui-text-02);

&:before {
content: '\2014';
left: 0;
top: auto;
width: auto;
height: auto;
background-color: transparent;
}
}
}

& a {
text-decoration: none;
color: var(--tui-link);

&:hover,
&:active {
color: var(--tui-link-hover);
top: auto;
width: auto;
height: auto;
background-color: transparent;
}
}
}

0 comments on commit 482726f

Please sign in to comment.