Skip to content

Commit

Permalink
[FEATURE] improve divider el
Browse files Browse the repository at this point in the history
  • Loading branch information
dmh committed May 17, 2016
1 parent 039867c commit f5db27f
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 32 deletions.
8 changes: 2 additions & 6 deletions dev/styles/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
// typicalContentElements
@import "main/typicalContentElements/typicalContentElements.less";
@import "main/typicalContentElements/lightbox.less";
@import "main/typicalContentElements/divider.less";


// elements
Expand All @@ -45,7 +46,7 @@
@import "main/contentElements/socialIcons.less";
@import "main/contentElements/parallax.less";

// wrappers
// appearance
@import "main/appearance/wrapperStyle/blueMountainWrp.less";
@import "main/appearance/wrapperStyle/blueMountainHeader.less";
@import "main/appearance/wrapperStyle/inverse.less";
Expand All @@ -58,11 +59,6 @@
@import "main/nav/breadcrumbs.less";
@import "main/nav/subNavigation.less";

// @import "main/custom/grayBackground.less";
// @import "main/custom/mosaic.less";
// @import "main/custom/fullWidthImageContent.less";
// @import "main/custom/dividerIcon.less";

// print styles
@import "main/print.less";

Expand Down
44 changes: 44 additions & 0 deletions dev/styles/main/typicalContentElements/divider.less
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;
}
20 changes: 0 additions & 20 deletions dev/styles/main/typicalContentElements/typicalContentElements.less
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,3 @@
list-style: none;
padding-left: 25px;
}

// Divider
.ce-div {
border-top: 1px solid @border-color;
}

// Divider Icon

.ce-div.icons {
text-align: center;
}

.ce-div.icons:before{
display: inline-block;
position: relative;
top: -0.6em;
font-size: 18px;
padding: 0 0.55em;
background: white;
}
13 changes: 7 additions & 6 deletions dev/templates/parts/content/typicalContent/divider.hbs
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{{!-- content example --}}
{{#if this.iconClass}}
<div class='dividerIcon'>
<span class="icons {{iconClass}}"></span>
</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">
<hr class="ce-div">
{{/if}}

0 comments on commit f5db27f

Please sign in to comment.