Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] Possibility to add icon in the middle of the divider
- Loading branch information
dmytro
committed
May 5, 2016
1 parent
aad6c63
commit e1b0452
Showing
5 changed files
with
74 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Divider | ||
|
||
.ce-div { | ||
border-top: 1px solid tint(@main-text-color, 90%); | ||
} | ||
|
||
|
||
.divider { | ||
position: relative; | ||
overflow: hidden; | ||
text-align: center; | ||
margin: 20px 0; | ||
} | ||
.divider__wrp { | ||
display: inline-block; | ||
position: relative; | ||
line-height: 1; | ||
} | ||
.divider__icon { | ||
color: tint(@main-text-color, 80%); | ||
font-size: 26px; | ||
} | ||
|
||
.divider__wrp:before, .divider__wrp:after{ | ||
content: ""; | ||
display: block; | ||
position: absolute; | ||
width: 700px; | ||
height: 1px; | ||
background: tint(@main-text-color, 90%); | ||
} | ||
|
||
.divider__wrp:before { | ||
left: 100%; | ||
top: 50%; | ||
margin-top: -1px; | ||
margin-left: 1.8em; | ||
} | ||
.divider__wrp:after { | ||
right: 100%; | ||
bottom: 50%; | ||
margin-bottom: -1px; | ||
margin-right: 1.8em; | ||
} |
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 |
---|---|---|
|
@@ -7,8 +7,3 @@ | |
list-style: none; | ||
padding-left: 25px; | ||
} | ||
|
||
// Divider | ||
.ce-div { | ||
border-top: 1px solid @border-color; | ||
} |
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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
{{!-- content example --}} | ||
|
||
<hr class="ce-div"> | ||
{{#if this.icon}} | ||
<div class="divider"> | ||
<div class="divider__wrp"> | ||
<span class="divider__icon icons icon-{{icon}}"></span> | ||
</div> | ||
</div> | ||
{{else}} | ||
<hr class="ce-div"> | ||
{{/if}} |