Summer 2013 biggest trend
A Pen by Fabien Butazzi on CodePen.
| <div class="icon-label pdf">PDF</div> | |
| <div class="icon-label dw">Dw</div> | |
| <div class="icon-label fw">Fw</div> | |
| <div class="icon-label ai">Ai</div> | |
| <div class="icon-label ps">Ps</div> | |
| <div class="icon-label id">Id</div> | |
| <div class="icon-label fl">Fl</div> | |
| <div class="icon-label lr">Lr</div> | |
| <hr /> | |
| <div class="icon-label pdf-3d">PDF</div> | |
| <div class="icon-label dw-3d">Dw</div> | |
| <div class="icon-label fw-3d">Fw</div> | |
| <div class="icon-label ai-3d">Ai</div> | |
| <div class="icon-label ps-3d">Ps</div> | |
| <div class="icon-label id-3d">Id</div> | |
| <div class="icon-label fl-3d">Fl</div> | |
| <div class="icon-label lr-3d">Lr</div> |
Summer 2013 biggest trend
A Pen by Fabien Butazzi on CodePen.
| /* the code is not ideal, it's only a mere experiment with the shadow */ | |
| /* variables */ | |
| @base-font: 24px; | |
| @base-padding: .25em; | |
| /* mixins */ | |
| .long-shadow(@bg, @fg, @text-shadow: (multiply(@bg, #bbb))) { | |
| background-color: @bg; | |
| color: @fg; | |
| margin: 0; | |
| text-shadow: 0px 0px @text-shadow,1px 1px @text-shadow,2px 2px @text-shadow,3px 3px @text-shadow,4px 4px @text-shadow,5px 5px @text-shadow,6px 6px @text-shadow,7px 7px @text-shadow,8px 8px @text-shadow,9px 9px @text-shadow,10px 10px @text-shadow,11px 11px @text-shadow,12px 12px @text-shadow,13px 13px @text-shadow,14px 14px @text-shadow,15px 15px @text-shadow,16px 16px @text-shadow,17px 17px @text-shadow,18px 18px @text-shadow,19px 19px @text-shadow,20px 20px @text-shadow,21px 21px @text-shadow,22px 22px @text-shadow,23px 23px @text-shadow,24px 24px @text-shadow,25px 25px @text-shadow,26px 26px @text-shadow,27px 27px @text-shadow,28px 28px @text-shadow,29px 29px @text-shadow,30px 30px @text-shadow; | |
| } | |
| .long-shadow-3d(@bg, @fg, @fg-s1: (@fg - #222), @fg-s2: (@fg - #444), @fg-s3: (@fg - #666), @text-shadow: (multiply(@bg, #bbb))) { | |
| background-color: @bg; | |
| color: @fg; | |
| margin: 0; | |
| text-shadow: 0px 1px @fg-s1,0px 2px @fg-s2,0px 3px @fg-s3,1px 4px @text-shadow,2px 5px @text-shadow,3px 6px @text-shadow,4px 7px @text-shadow,5px 8px @text-shadow,6px 9px @text-shadow,7px 10px @text-shadow,8px 11px @text-shadow,9px 12px @text-shadow,10px 13px @text-shadow,11px 14px @text-shadow,12px 15px @text-shadow,13px 16px @text-shadow,14px 17px @text-shadow,15px 18px @text-shadow,16px 19px @text-shadow,17px 20px @text-shadow,18px 21px @text-shadow,19px 22px @text-shadow,20px 23px @text-shadow,21px 24px @text-shadow,22px 25px @text-shadow,23px 26px @text-shadow,24px 27px @text-shadow,25px 28px @text-shadow,26px 29px @text-shadow,27px 30px @text-shadow; | |
| } | |
| .border-radius (@radius) { | |
| -webkit-border-radius: @radius; | |
| -moz-border-radius: @radius; | |
| border-radius: @radius; | |
| } | |
| .base-transition (@time) { | |
| -webkit-transition: @time; | |
| -moz-transition: @time; | |
| transition: @time; | |
| } | |
| /* CSS */ | |
| .icon-label { | |
| font-family: sans-serif; | |
| font-weight: 100; | |
| font-size: @base-font; | |
| padding: (@base-padding * 2) (@base-padding * 3); | |
| overflow: hidden; | |
| display: inline-block; | |
| .border-radius (8px); | |
| .base-transition (.4s); | |
| } | |
| .icon-label[class*="3d"]:hover { | |
| cursor: pointer; | |
| text-shadow: 0 0 transparent; | |
| } | |
| .pdf { | |
| .long-shadow(#e74c3c,#fff); | |
| } | |
| .dw { | |
| .long-shadow(#8eec19,#fff); | |
| } | |
| .fw { | |
| .long-shadow(#fbcf33,#fff); | |
| } | |
| .ai { | |
| .long-shadow(#f18039,#fff); | |
| } | |
| .ps { | |
| .long-shadow(#5ec0f9,#fff); | |
| } | |
| .id { | |
| .long-shadow(#ed6194,#fff); | |
| } | |
| .fl { | |
| .long-shadow(#ed5a34,#fff); | |
| } | |
| .lr { | |
| .long-shadow(#b4d3e8,#fff); | |
| } | |
| .pdf-3d { | |
| .long-shadow-3d(#e74c3c,#fff); | |
| } | |
| .dw-3d { | |
| .long-shadow-3d(#8eec19,#fff); | |
| } | |
| .fw-3d { | |
| .long-shadow-3d(#fbcf33,#fff); | |
| } | |
| .ai-3d { | |
| .long-shadow-3d(#f18039,#fff); | |
| } | |
| .ps-3d { | |
| .long-shadow-3d(#5ec0f9,#fff); | |
| } | |
| .id-3d { | |
| .long-shadow-3d(#ed6194,#fff); | |
| } | |
| .fl-3d { | |
| .long-shadow-3d(#ed5a34,#fff); | |
| } | |
| .lr-3d { | |
| .long-shadow-3d(#b4d3e8,#fff); | |
| } |