-
Notifications
You must be signed in to change notification settings - Fork 475
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(demo): use css variable instead of shadow mixin (#6146)
- Loading branch information
Showing
31 changed files
with
88 additions
and
81 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
2 changes: 1 addition & 1 deletion
2
projects/addon-doc/components/internal/header/header.style.less
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
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
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
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
2 changes: 1 addition & 1 deletion
2
projects/demo/src/modules/components/app-bar/examples/1/index.less
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
border-radius: 100%; | ||
|
||
&_active { | ||
.shadow(2); | ||
box-shadow: var(--tui-shadow-dropdown); | ||
transform: scale(1.2); | ||
} | ||
} |
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 |
---|---|---|
|
@@ -28,7 +28,7 @@ | |
overflow: hidden; | ||
|
||
tui-tile._dragged & { | ||
.shadow(5); | ||
box-shadow: var(--tui-shadow-hover); | ||
} | ||
} | ||
|
||
|
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 |
---|---|---|
|
@@ -24,6 +24,6 @@ | |
cursor: ns-resize; | ||
|
||
tui-tile._dragged & { | ||
.shadow(5); | ||
box-shadow: var(--tui-shadow-hover); | ||
} | ||
} |
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
2 changes: 1 addition & 1 deletion
2
projects/demo/src/modules/directives/portal/examples/1/index.less
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
|
||
.custom-1 { | ||
.gradient(#0094cf, #24c0ff); | ||
.shadow(); | ||
box-shadow: var(--tui-shadow); | ||
} | ||
|
||
.custom-2 { | ||
|
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 |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
gap: 1rem; | ||
|
||
* { | ||
.shadow(1); | ||
box-shadow: var(--tui-shadow); | ||
font-weight: bold; | ||
text-align: center; | ||
} | ||
|
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 |
---|---|---|
|
@@ -64,5 +64,5 @@ | |
} | ||
|
||
.shadow:hover { | ||
.shadow(5); | ||
box-shadow: var(--tui-shadow-hover); | ||
} |
34 changes: 22 additions & 12 deletions
34
projects/demo/src/modules/markup/shadows/shadows.style.less
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,51 +1,61 @@ | ||
@import '@taiga-ui/core/styles/taiga-ui-local'; | ||
|
||
.example { | ||
.title { | ||
text-align: center; | ||
} | ||
|
||
.examples { | ||
display: flex; | ||
flex: 1; | ||
gap: 2.5rem; | ||
flex-wrap: wrap; | ||
padding: 1.25rem; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.item { | ||
.transition(box-shadow); | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
margin-top: 2.5rem; | ||
margin-left: 2.5rem; | ||
width: 17.5rem; | ||
height: 5rem; | ||
padding: 0.3125rem; | ||
border-radius: var(--tui-radius-m); | ||
border: 1px solid var(--tui-base-02); | ||
color: var(--tui-text-03); | ||
cursor: pointer; | ||
text-align: center; | ||
|
||
&_default { | ||
.shadow(); | ||
box-shadow: var(--tui-shadow); | ||
|
||
&:hover { | ||
.shadow(5); | ||
box-shadow: var(--tui-shadow-hover); | ||
} | ||
} | ||
|
||
&_dropdown { | ||
.shadow(2); | ||
box-shadow: var(--tui-shadow-dropdown); | ||
} | ||
|
||
&_modal { | ||
.shadow(3); | ||
box-shadow: var(--tui-shadow-modal); | ||
} | ||
|
||
&_sidebar { | ||
.shadow(4); | ||
box-shadow: var(--tui-shadow-sidebar); | ||
} | ||
|
||
&_navigation { | ||
.shadow(6); | ||
box-shadow: var(--tui-shadow-navigation); | ||
} | ||
|
||
&_mobile { | ||
.shadow(7); | ||
box-shadow: var(--tui-shadow-sheet); | ||
} | ||
} | ||
|
||
.code:not(pre code) { | ||
color: var(--tui-link); | ||
} |
64 changes: 31 additions & 33 deletions
64
projects/demo/src/modules/markup/shadows/shadows.template.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 |
---|---|---|
@@ -1,36 +1,34 @@ | ||
<tui-doc-page header="Shadows"> | ||
<ng-template pageTab> | ||
<p>Different kinds of shadows can be applied with mixin:</p> | ||
<div class="example"> | ||
<div class="item item_default"> | ||
<span> | ||
Basic shadow: | ||
<code>.shadow(1)</code> | ||
with | ||
<code>.shadow(5)</code> | ||
when hovered | ||
</span> | ||
</div> | ||
<div class="item item_dropdown"> | ||
Dropdown shadow: | ||
<code>.shadow(2)</code> | ||
</div> | ||
<div class="item item_modal"> | ||
Modal shadow: | ||
<code>.shadow(3)</code> | ||
</div> | ||
<div class="item item_sidebar"> | ||
Sidebar shadow: | ||
<code>.shadow(4)</code> | ||
</div> | ||
<div class="item item_navigation"> | ||
Navigation shadow: | ||
<code>.shadow(6)</code> | ||
</div> | ||
<div class="item item_mobile"> | ||
Mobile modal shadow: | ||
<code>.shadow(7)</code> | ||
</div> | ||
<p class="title tui-space_bottom-5">Different kinds of shadows can be applied with css variables:</p> | ||
<div class="examples"> | ||
<div class="item item_default"> | ||
<span> | ||
Basic shadow: | ||
<code class="code">--tui-shadow</code> | ||
with | ||
<code class="code">--tui-shadow-hovered</code> | ||
when hovered | ||
</span> | ||
</div> | ||
</ng-template> | ||
<div class="item item_dropdown"> | ||
Dropdown shadow: | ||
<code class="code">--tui-shadow-dropdown</code> | ||
</div> | ||
<div class="item item_modal"> | ||
Modal shadow: | ||
<code class="code">--tui-shadow-modal</code> | ||
</div> | ||
<div class="item item_sidebar"> | ||
Sidebar shadow: | ||
<code class="code">--tui-shadow-sidebar</code> | ||
</div> | ||
<div class="item item_navigation"> | ||
Navigation shadow: | ||
<code class="code">--tui-shadow-navigation</code> | ||
</div> | ||
<div class="item item_mobile"> | ||
Mobile modal shadow: | ||
<code class="code">--tui-shadow-sheet</code> | ||
</div> | ||
</div> | ||
</tui-doc-page> |
Oops, something went wrong.