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
# Lime Utilities | |
## A library of Sass modules - functions, mixins, placeholders and variables. | |
Welcome to the Lime Utilities overview. Before continuing, you should have a general understanding of the [SCSS](http://sass-lang.com/) syntax, and [KSS](https://github.com/kneath/kss) documentation. | |
### Coding Style | |
#### Spacing | |
- Use soft-tabs with a two space indent. Spaces are the only way to guarantee code renders the same in any person's environment. |
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
@keyframes fadeInDown { | |
0% { | |
opacity: 0; | |
transform: translate3d(0, -100%, 0); | |
} | |
100% { | |
opacity: 1; | |
transform: none; | |
} |
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
@function list-map($map, $map-key) { | |
@each $val in $map { | |
$key: nth($val, 1); | |
$value: nth($val, 2); | |
@if $map-key == $key { | |
@return $value; | |
} | |
} | |
} |
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
// Parameters: | |
// ```scss | |
// $layout : establish main-axis, either horizontal or vertical. | |
// $nowrap : flex items will try to fit onto one line. Optional | |
// $alignment : define alignment along the main and cross axis. Defaults to default | |
// $align-content : align lines in flex container when there is extra space. Optional | |
// | |
// $flex : shorthand for flex-grow, flex-shrink and flex-basis. Defaults to auto | |
// $order : order flex-items. Optional | |
// $align-self : override default alignment of individual flex items. Optional |
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
// Parameters: | |
// ```scss | |
// $color : semi-transparent color | |
// $bg-color : background color. Defaults to white. | |
// $property : CSS property for $color. Defaults to background-color. | |
// $attr : additional CSS attr for $property. Optional | |
// ``` | |
// | |
// Usage: | |
// ```scss |
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
/* Controlling excerpt length using filters */ | |
function custom_excerpt_length( $length ) { | |
return 20; | |
} | |
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 ); | |
/* Limit content length */ | |
function word_limit($string, $max_words){ |
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
z-depth = 1 | |
Top Shadow | |
12% black | |
x-offset=0 | |
y-offset=1dp | |
blur: 1.5dp | |
Bottom Shadow | |
24% black |
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
<!-- Hide Dockbar --> | |
#if ($permissionChecker.isOmniadmin()) | |
<!--#if ($permissionChecker.isCompanyAdmin($company_id)) | |
#if ($permissionChecker.isCommunityAdmin($portletGroupId)) | |
#if ($permissionChecker.isCommunityOwner($portletGroupId))--> | |
#dockbar() | |
#end | |
#if (!$is_signed_in) | |
<a href="$sign_in_url" rel="nofollow">$sign_in_text</a> |
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
// Parameters: | |
// ```scss | |
// $ratio : aspect ratio | |
// $type : wrap or crop. Defaults to default | |
// ``` | |
// | |
// Usage: | |
// ```scss | |
// .img-cover { | |
// @include fixed-ratio($ratio: 16/9); |
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
// Parameters: | |
// ```scss | |
// $map : Map converted to List | |
// $property : CSS property | |
// $loop : Loop through list. Predefined as true | |
// $map-key: Key for desired value in key/value pair. Predefined as null | |
// $namespace : Prefix for placeholders. Predefined as null | |
// ``` | |
// | |
// Usage: |
NewerOlder