Last active
December 24, 2015 11:39
-
-
Save sevenbest/6792327 to your computer and use it in GitHub Desktop.
Less: Base
This file contains hidden or 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
| .no-link-styles(@color: inherit) { | |
| color: @color; | |
| &:hover { | |
| text-decoration: none; | |
| color: @color; | |
| } | |
| } | |
| .no-link-styles-with-underline(@color: inherit) { | |
| color: @color; | |
| &:hover { | |
| text-decoration: underline; | |
| color: @color; | |
| } | |
| } | |
| .no-link-styles-with-perm-underline(@color: inherit) { | |
| color: @color; | |
| text-decoration: underline; | |
| &:hover { | |
| color: @color; | |
| } | |
| } | |
| .shadow(@x: 1px, @y: 1px, @blur: 1px, @spread: 1px, @col: #ccc) { | |
| -webkit-box-shadow: @x @y @blur @spread @col; | |
| box-shadow: @x @y @blur @spread @col; | |
| } | |
| .inset-shadow(@x: 1px, @y: 1px, @blur: 1px, @spread: 1px, @col: #ccc) { | |
| -webkit-box-shadow: inset @x @y @blur @spread @col; | |
| box-shadow: inset @x @y @blur @spread @col; | |
| } | |
| // two stop gradients -- compatible with all browsers | |
| .gradient(@start, @end) { | |
| background: @start; | |
| background: -moz-linear-gradient(top, @start 0%, @end 100%); | |
| background: -webkit-gradient(linear, left top, left bottom, color-stop(0% @start), color-stop(100%, @end)); | |
| background: -webkit-linear-gradient(top, @start 0%, @end 100%); | |
| background: -o-linear-gradient(top, @start 0%, @end 100%); | |
| background: -ms-linear-gradient(top, @start 0%, @end 100%); | |
| background: linear-gradient(to bottom, @start 0%, @end 100%); | |
| filter: progid:DXImageTransform.Microsoft.gradient( startColorstr=@start, endColorstr=@end,GradientType=0 ); | |
| } | |
| .border-radius (@radius: 5px) { | |
| -webkit-border-radius: @radius; | |
| -moz-border-radius: @radius; | |
| -ms-border-radius: @radius; | |
| -o-border-radius: @radius; | |
| border-radius: @radius; | |
| } | |
| .cursor() { | |
| cursor: hand; | |
| cursor: pointer; | |
| } | |
| .no-cursor() { | |
| cursor: default; | |
| } | |
| .ir() { | |
| border: 0; | |
| font: 0/0 a; | |
| text-shadow: none; | |
| color: transparent; | |
| background-color: transparent; | |
| } | |
| .deny-select() { | |
| -webkit-touch-callout: none; | |
| -webkit-user-select: none; | |
| -khtml-user-select: none; | |
| -moz-user-select: none; | |
| -ms-user-select: none; | |
| user-select: none; | |
| } | |
| .clearfix() { | |
| &:before, | |
| &:after { | |
| content: " "; | |
| display: table; | |
| } | |
| &:after { | |
| clear: both; | |
| } | |
| } | |
| /* for ULs */ | |
| .no-bullets() { | |
| padding: 0; | |
| margin: 0; | |
| list-style: none; | |
| } | |
| .text-shadow (@x: 2px, @y: 1px, @b: 2px, @col:#000) { | |
| text-shadow: @x @y @b @col; | |
| filter: dropshadow(color=@col, offx=@x, offy=@y); | |
| } | |
| .expand-background() { | |
| margin-left: -15px; | |
| padding-left: 15px; | |
| padding-right: 15px; | |
| @media (min-width: 980px) { | |
| width: 970px; | |
| } | |
| @media (min-width: 768px) and (max-width: 979px) { | |
| width: 750px; | |
| } | |
| } | |
| .submit-ir (@src, @width, @height) { | |
| .ir; | |
| background: url(@src) no-repeat center; | |
| width: @width; | |
| height: @height; | |
| } | |
| .clamp() { | |
| display: -webkit-box; | |
| -webkit-line-clamp: 2; | |
| -webkit-box-orient: vertical; | |
| } | |
| .custom-ul(@ul-pl: 40px, @bg-x: 0, @bg-y: 0, @li-pl: 22px, @li-mb: 10px) { | |
| list-style: none; | |
| margin-left: 0; | |
| padding-left: @ul-pl; | |
| li { | |
| background: url('/_/img/custom-bullet.jpg') no-repeat @bg-x @bg-y; | |
| padding-left: @li-pl; | |
| margin-bottom: @li-mb; | |
| } | |
| } | |
| .responsive-video-container() { | |
| position: relative; | |
| padding-bottom: 56.25%; | |
| padding-top: 30px; height: 0; overflow: hidden; | |
| iframe, object, embed { | |
| position: absolute; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| } | |
| } | |
| /****************************************************************************** | |
| Bootstrap Mixins | |
| ******************************************************************************/ | |
| .hidden-xs-inline() { | |
| display: inline-block !important; | |
| @media (max-width: 767px) { | |
| display: none !important; | |
| } | |
| } | |
| .hidden-sm-inline() { | |
| display: inline-block !important; | |
| @media (min-width: 768px) and (max-width: 991px) { | |
| display: none !important; | |
| } | |
| } | |
| // to be applied on col classes | |
| .bs3-expand-background() { | |
| @media (max-width: 767px) { | |
| padding: 0; | |
| } | |
| } | |
| .xs-hidden-important() { | |
| @media (max-width: 767px) { | |
| display: none !important; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment