-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(common-css): add label, heading, text to common css [ci visual]
- Loading branch information
1 parent
22a8b75
commit 273d66f
Showing
11 changed files
with
245 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
@import 'common-settings'; | ||
@import 'common-mixins'; | ||
|
||
.#{$sap-namespace}-label { | ||
@include sap-label(); | ||
} | ||
|
||
.#{$sap-namespace}-label-required { | ||
@include sap-label($required: true); | ||
} | ||
|
||
.#{$sap-namespace}-label-colon { | ||
@include sap-label($colon: true); | ||
} | ||
|
||
.#{$sap-namespace}-label-colon-required { | ||
@include sap-label($required: true, $colon: true); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,18 @@ | ||
@import 'common-settings'; | ||
@import 'common-mixins'; | ||
|
||
$block: #{$sap-namespace}-text; | ||
|
||
.#{$block} { | ||
@include sap-reset(); | ||
|
||
// &::selection { //todo bring delta theming | ||
// color: var(--sapContent_ContrastTextColor); | ||
// background-color: var(--fdText_Selected_Background_Color); | ||
// } | ||
.#{$sap-namespace}-text { | ||
@include sap-text(); | ||
} | ||
|
||
&--max-lines { | ||
display: -webkit-box; | ||
-webkit-box-orient: vertical; | ||
overflow: hidden; | ||
} | ||
.#{$sap-namespace}-text-max-lines { | ||
@include sap-text('max-lines'); | ||
} | ||
|
||
&--pre-wrap { | ||
white-space: pre-wrap; | ||
} | ||
.#{$sap-namespace}-text-pre-wrap { | ||
@include sap-text('pre-wrap'); | ||
} | ||
|
||
&--hyphenation { | ||
hyphens: auto; | ||
} | ||
.#{$sap-namespace}-text-hyphenation { | ||
@include sap-text('hyphenation'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
packages/common-css/stories/label/default-example.example.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<label class="sap-label">Default Label</label> | ||
<br> | ||
<label class="sap-label-required">Required Label</label> | ||
<br> | ||
<label class="sap-label-colon">Colon Label</label> | ||
<br> | ||
<label class="sap-label-colon-required">Required Colon Label</label> | ||
<br> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import defaultExampleExampleHtml from "./default-example.example.html?raw"; | ||
import '../../src/sap-label.scss'; | ||
|
||
export default { | ||
title: 'Label', | ||
parameters: { | ||
description: `The following classes and mixin provide a way to style your labels per SAP design. | ||
<br><br> | ||
<b>CSS Classes: </b><br><br> | ||
<code>.sap-label</code><br> | ||
<code>.sap-label-required</code><br> | ||
<code>.sap-label-colon</code><br> | ||
<code>.sap-label-colon-required</code><br><br><br> | ||
<b>SCSS Mixin: </b> | ||
<code>@include sap-label(<i style="color: red;">$required, $colon</i>)</code><br> | ||
where <i style="color: red;">$required</i> and <i style="color: red;">$colon</i> are optional and can be set individually. <br> | ||
- <code>@include sap-label($required: true)</code>: to display a label with asterisk<br> | ||
- <code>@include sap-label($colon: true)</code>: to display a label with colon<br> | ||
- <code>@include sap-label($required: true, $colon: true)</code>: to display a label with asterisk and colon<br>` | ||
} | ||
}; | ||
export const DefaultExample = () => defaultExampleExampleHtml; | ||
DefaultExample.storyName = 'Examples'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.