Skip to content

Commit

Permalink
chore(docs): removed documentaion and occurences of text-\* utility c…
Browse files Browse the repository at this point in the history
…lasses.
  • Loading branch information
schaertim committed Jan 8, 2025
1 parent ea5c638 commit 6263304
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 45 deletions.
5 changes: 5 additions & 0 deletions .changeset/selfish-jobs-rescue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@swisspost/design-system-documentation': minor
---

Removed documentaion and occurences of text-\* utility classes.
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,9 @@ export const Default: Story = {
};

const colorVariants = [
{ class: 'text-primary' },
{ class: 'text-info' },
{ class: 'text-success' },
{ style: 'color: green' },
{ style: 'color: blue' },
{ style: 'color:#800080' },
{ style: 'color: #800080' },
{ style: 'color: rgb(230, 0, 0)' },
];

Expand Down Expand Up @@ -140,7 +138,7 @@ export const Size: Story = {

const styleVariants = [
{ class: 'border rounded p-16', style: 'font-size: 4rem' },
{ class: 'border border-success rounded p-16 text-success', style: 'font-size: 4rem' },
{ class: 'border border-success rounded p-16', style: 'font-size: 4rem; color: green' },
{ class: 'rounded-circle p-16', style: 'font-size: 4rem; background-color: #cce4ee' },
];

Expand Down
21 changes: 0 additions & 21 deletions packages/documentation/src/stories/utilities/text/text.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -92,27 +92,6 @@ There are no Sass variables for these row heights.

Define how text-blocks are displayed.

### Color

Colorize text with `.text-*` utility classes.
To colorize links, use the `.link-*` classes instead as they also provide styling for the `:hover` and `:focus` states.

<Canvas of={TextStories.TextColor} sourceState="shown" />

#### Set the Color in SCSS

<Source code={SampleColor} language="scss" />

#### Possible Values

<TextUtilityAPI values={SCSS_VARIABLES.colors} cssPrefix="text" />

### Reset Color

Reset a text color with `.text-reset`, so that an element inherits the color from its parent.

<Canvas of={TextStories.TextColorReset} sourceState="shown" />

### Alignment

Easily realign text to components with text alignment classes.
Expand Down
19 changes: 0 additions & 19 deletions packages/documentation/src/stories/utilities/text/text.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,6 @@ export const LineHeight: Story = {
render: () => html` <p class="lh-1">This text has a line height equal to the font size.</p> `,
};

export const TextColor: Story = {
decorators: [story => html` <div @click=${(e: Event) => e.preventDefault()}>${story()}</div> `],
render: () => html`
<p class="text-success">This is colored text.</p>
<a href="#" class="link-warning">This is a colored link, it lightens on hover.</a>
`,
};

export const TextColorReset: Story = {
decorators: [story => html` <div @click=${(e: Event) => e.preventDefault()}>${story()}</div> `],
render: () => html`
<p class="text-danger">
This is colored text with a
<a href="#" class="text-reset">link</a>
of the same color.
</p>
`,
};

export const TextAlign: Story = {
render: () => html`
<p class="text-start">Start aligned text</p>
Expand Down

0 comments on commit 6263304

Please sign in to comment.