titon-toolkit 0.9.1 → 0.9.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/src/scss/normalize.scss +396 -0
- data/src/scss/toolkit.scss +38 -0
- data/src/scss/toolkit/_common.scss +16 -0
- data/src/scss/toolkit/_variables.scss +59 -0
- data/src/scss/toolkit/effects/visual.scss +75 -0
- data/src/scss/toolkit/layout/base.scss +93 -0
- data/src/scss/toolkit/layout/code.scss +61 -0
- data/src/scss/toolkit/layout/form.scss +158 -0
- data/src/scss/toolkit/layout/grid.scss +64 -0
- data/src/scss/toolkit/layout/input-group.scss +56 -0
- data/src/scss/toolkit/layout/responsive.scss +53 -0
- data/src/scss/toolkit/layout/table.scss +82 -0
- data/src/scss/toolkit/layout/typography.scss +49 -0
- data/src/scss/toolkit/mixins/_grid.scss +24 -0
- data/src/scss/toolkit/mixins/_layout.scss +90 -0
- data/src/scss/toolkit/mixins/_responsive.scss +111 -0
- data/src/scss/toolkit/mixins/_themes.scss +98 -0
- data/src/scss/toolkit/modules/accordion.scss +62 -0
- data/src/scss/toolkit/modules/blackout.scss +24 -0
- data/src/scss/toolkit/modules/carousel.scss +175 -0
- data/src/scss/toolkit/modules/flyout.scss +78 -0
- data/src/scss/toolkit/modules/modal.scss +243 -0
- data/src/scss/toolkit/modules/popover.scss +84 -0
- data/src/scss/toolkit/modules/showcase.scss +166 -0
- data/src/scss/toolkit/modules/tabs.scss +56 -0
- data/src/scss/toolkit/modules/tooltip.scss +130 -0
- data/src/scss/toolkit/modules/type-ahead.scss +67 -0
- data/src/scss/toolkit/themes/titon.scss +364 -0
- data/src/scss/toolkit/themes/tomorrow-night.scss +569 -0
- data/src/scss/toolkit/ui/alert.scss +48 -0
- data/src/scss/toolkit/ui/breadcrumbs.scss +51 -0
- data/src/scss/toolkit/ui/button-group.scss +204 -0
- data/src/scss/toolkit/ui/button.scss +48 -0
- data/src/scss/toolkit/ui/dropdown.scss +105 -0
- data/src/scss/toolkit/ui/icon.scss +22 -0
- data/src/scss/toolkit/ui/label-badge.scss +76 -0
- data/src/scss/toolkit/ui/lazy-load.scss +14 -0
- data/src/scss/toolkit/ui/pagination.scss +128 -0
- data/src/scss/toolkit/ui/pin.scss +16 -0
- data/src/scss/toolkit/ui/progress.scss +34 -0
- metadata +42 -2
@@ -0,0 +1,64 @@
|
|
1
|
+
/**
|
2
|
+
* @copyright Copyright 2010-2013, The Titon Project
|
3
|
+
* @license http://opensource.org/licenses/bsd-license.php
|
4
|
+
* @link http://titon.io
|
5
|
+
*/
|
6
|
+
|
7
|
+
@import "../common";
|
8
|
+
|
9
|
+
.grid {
|
10
|
+
@include grid-row;
|
11
|
+
}
|
12
|
+
|
13
|
+
// These should be the same for all sizes
|
14
|
+
@for $i from 1 through $grid-columns {
|
15
|
+
$span: grid-span($i);
|
16
|
+
|
17
|
+
.span-#{$i} { width: $span; }
|
18
|
+
.push-#{$i} { left: $span; }
|
19
|
+
.pull-#{$i} { right: $span; }
|
20
|
+
}
|
21
|
+
|
22
|
+
// Mobile supports 3 columns
|
23
|
+
.col[class*="span-"],
|
24
|
+
.col[class*="mobile-"] {
|
25
|
+
@include grid-column;
|
26
|
+
}
|
27
|
+
|
28
|
+
@for $i from 1 through ceil($grid-columns / 4) {
|
29
|
+
$span: grid-span($i * 4);
|
30
|
+
|
31
|
+
.col.mobile-#{$i} { width: $span; }
|
32
|
+
.col.mobile-push-#{$i} { left: $span; }
|
33
|
+
.col.mobile-pull-#{$i} { right: $span; }
|
34
|
+
}
|
35
|
+
|
36
|
+
// Tablet supports 6 columns
|
37
|
+
@include in-tablet {
|
38
|
+
.col[class*="tablet-"] {
|
39
|
+
@include grid-column;
|
40
|
+
}
|
41
|
+
|
42
|
+
@for $i from 1 through ceil($grid-columns / 2) {
|
43
|
+
$span: grid-span($i * 2);
|
44
|
+
|
45
|
+
.col.tablet-#{$i} { width: $span; }
|
46
|
+
.col.tablet-push-#{$i} { left: $span; }
|
47
|
+
.col.tablet-pull-#{$i} { right: $span; }
|
48
|
+
}
|
49
|
+
}
|
50
|
+
|
51
|
+
// Desktop supports 12 columns
|
52
|
+
@include in-desktop {
|
53
|
+
.col[class*="desktop-"] {
|
54
|
+
@include grid-column;
|
55
|
+
}
|
56
|
+
|
57
|
+
@for $i from 1 through $grid-columns {
|
58
|
+
$span: grid-span($i);
|
59
|
+
|
60
|
+
.col.desktop-#{$i} { width: $span; }
|
61
|
+
.col.desktop-push-#{$i} { left: $span; }
|
62
|
+
.col.desktop-pull-#{$i} { right: $span; }
|
63
|
+
}
|
64
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
/**
|
2
|
+
* @copyright Copyright 2010-2013, The Titon Project
|
3
|
+
* @license http://opensource.org/licenses/bsd-license.php
|
4
|
+
* @link http://titon.io
|
5
|
+
*/
|
6
|
+
|
7
|
+
@import "../common";
|
8
|
+
|
9
|
+
.input-group {
|
10
|
+
display: inline-block;
|
11
|
+
|
12
|
+
> .input,
|
13
|
+
> .input-addon,
|
14
|
+
> .button,
|
15
|
+
> .button-group {
|
16
|
+
display: inline-block;
|
17
|
+
position: relative;
|
18
|
+
border-radius: 0;
|
19
|
+
margin-right: -6px; // Remove whitespace and overlap borders
|
20
|
+
white-space: nowrap;
|
21
|
+
height: auto;
|
22
|
+
vertical-align: middle;
|
23
|
+
}
|
24
|
+
|
25
|
+
// Inputs should always be above everything else
|
26
|
+
> .input { z-index: 1; }
|
27
|
+
}
|
28
|
+
|
29
|
+
.input-addon {
|
30
|
+
border: 1px solid $gray-dark;
|
31
|
+
background: $gray;
|
32
|
+
vertical-align: middle;
|
33
|
+
padding: $medium-padding;
|
34
|
+
line-height: normal;
|
35
|
+
font-size: inherit;
|
36
|
+
}
|
37
|
+
|
38
|
+
//-------------------- Modifiers --------------------//
|
39
|
+
|
40
|
+
.input-group.round {
|
41
|
+
> .input:first-child,
|
42
|
+
> .input-addon:first-child,
|
43
|
+
> .button:first-child,
|
44
|
+
> .button-group:first-child .button {
|
45
|
+
border-top-left-radius: $round;
|
46
|
+
border-bottom-left-radius: $round;
|
47
|
+
}
|
48
|
+
|
49
|
+
> .input:last-child,
|
50
|
+
> .input-addon:last-child,
|
51
|
+
> .button:last-child,
|
52
|
+
> .button-group:last-child .button {
|
53
|
+
border-top-right-radius: $round;
|
54
|
+
border-bottom-right-radius: $round;
|
55
|
+
}
|
56
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
/**
|
2
|
+
* @copyright Copyright 2010-2013, The Titon Project
|
3
|
+
* @license http://opensource.org/licenses/bsd-license.php
|
4
|
+
* @link http://titon.io
|
5
|
+
*/
|
6
|
+
|
7
|
+
@import "../common";
|
8
|
+
|
9
|
+
img, video, canvas {
|
10
|
+
max-width: 100%;
|
11
|
+
max-height: auto;
|
12
|
+
height: auto;
|
13
|
+
}
|
14
|
+
|
15
|
+
.show-print { display: none; }
|
16
|
+
|
17
|
+
// Desktop states
|
18
|
+
@include in-desktop {
|
19
|
+
.show-tablet,
|
20
|
+
.show-mobile,
|
21
|
+
.hide-desktop { display: none; }
|
22
|
+
}
|
23
|
+
|
24
|
+
// Tablet states
|
25
|
+
@include in-tablet {
|
26
|
+
.show-desktop,
|
27
|
+
.show-mobile,
|
28
|
+
.hide-tablet { display: none; }
|
29
|
+
}
|
30
|
+
|
31
|
+
// Mobile states
|
32
|
+
@include in-mobile {
|
33
|
+
.show-desktop,
|
34
|
+
.show-tablet,
|
35
|
+
.hide-mobile { display: none; }
|
36
|
+
}
|
37
|
+
|
38
|
+
// Orientation states
|
39
|
+
@include if-portrait {
|
40
|
+
.show-landscape,
|
41
|
+
.hide-portrait { display: none; }
|
42
|
+
}
|
43
|
+
|
44
|
+
@include if-landscape {
|
45
|
+
.show-portrait,
|
46
|
+
.hide-landscape { display: none; }
|
47
|
+
}
|
48
|
+
|
49
|
+
// Type states
|
50
|
+
@media print {
|
51
|
+
.show-print { display: block; }
|
52
|
+
.hide-print { display: none; }
|
53
|
+
}
|
@@ -0,0 +1,82 @@
|
|
1
|
+
/**
|
2
|
+
* @copyright Copyright 2010-2013, The Titon Project
|
3
|
+
* @license http://opensource.org/licenses/bsd-license.php
|
4
|
+
* @link http://titon.io
|
5
|
+
*/
|
6
|
+
|
7
|
+
@import "../common";
|
8
|
+
|
9
|
+
.table {
|
10
|
+
width: 100%;
|
11
|
+
background: $gray;
|
12
|
+
border-collapse: collapse;
|
13
|
+
|
14
|
+
th, td {
|
15
|
+
padding: $padding;
|
16
|
+
line-height: 110%;
|
17
|
+
vertical-align: top;
|
18
|
+
border: 1px solid $gray-dark;
|
19
|
+
}
|
20
|
+
|
21
|
+
// Move headings to bottom
|
22
|
+
thead th {
|
23
|
+
vertical-align: bottom;
|
24
|
+
text-align: left;
|
25
|
+
}
|
26
|
+
|
27
|
+
// Allow for multiple tbody's
|
28
|
+
tbody + tbody { border-top-width: 2px; }
|
29
|
+
|
30
|
+
// Row colors
|
31
|
+
thead tr,
|
32
|
+
tfoot tr {
|
33
|
+
background: $gray-dark;
|
34
|
+
|
35
|
+
th { border-color: shade($gray-dark, 10%); }
|
36
|
+
}
|
37
|
+
|
38
|
+
// Zebra striping
|
39
|
+
tbody tr {
|
40
|
+
background: $gray;
|
41
|
+
|
42
|
+
&:nth-child(odd) { background: $gray-light; }
|
43
|
+
&.divider { background: shade($gray, 2%); }
|
44
|
+
}
|
45
|
+
}
|
46
|
+
|
47
|
+
//-------------------- Modifiers --------------------//
|
48
|
+
|
49
|
+
.table.table--hover {
|
50
|
+
tbody tr:not(.divider):hover { background: #fff; }
|
51
|
+
}
|
52
|
+
|
53
|
+
.table.table--sortable {
|
54
|
+
thead th {
|
55
|
+
padding: 0;
|
56
|
+
|
57
|
+
a, span {
|
58
|
+
padding: $padding;
|
59
|
+
display: block;
|
60
|
+
}
|
61
|
+
|
62
|
+
a {
|
63
|
+
background: $gray-dark;
|
64
|
+
color: #000;
|
65
|
+
|
66
|
+
&:hover { background: shade($gray-dark, 5%); }
|
67
|
+
}
|
68
|
+
}
|
69
|
+
}
|
70
|
+
|
71
|
+
.table.table--compact {
|
72
|
+
thead th,
|
73
|
+
tbody td { padding: $small-padding; }
|
74
|
+
|
75
|
+
&.table--sortable {
|
76
|
+
thead th {
|
77
|
+
padding: 0;
|
78
|
+
|
79
|
+
a, span { padding: $small-padding; }
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
@@ -0,0 +1,49 @@
|
|
1
|
+
/**
|
2
|
+
* @copyright Copyright 2010-2013, The Titon Project
|
3
|
+
* @license http://opensource.org/licenses/bsd-license.php
|
4
|
+
* @link http://titon.io
|
5
|
+
*/
|
6
|
+
|
7
|
+
@import "../common";
|
8
|
+
|
9
|
+
h1 { font-size: 2.5rem; }
|
10
|
+
h2 { font-size: 2.2rem; }
|
11
|
+
h3 { font-size: 1.8rem; }
|
12
|
+
h4 { font-size: 1.5rem; }
|
13
|
+
h5 { font-size: 1.2rem; }
|
14
|
+
h6 { font-size: 1rem; }
|
15
|
+
|
16
|
+
h1, h2, h3, h4, h5, h6 {
|
17
|
+
margin: 0;
|
18
|
+
padding: 0;
|
19
|
+
line-height: 100%;
|
20
|
+
font-weight: normal;
|
21
|
+
}
|
22
|
+
|
23
|
+
p, ul, ol, hr, blockquote {
|
24
|
+
margin: $margin 0;
|
25
|
+
}
|
26
|
+
|
27
|
+
blockquote {
|
28
|
+
margin: $margin;
|
29
|
+
padding: 0 $padding;
|
30
|
+
border-left: 5px solid $gray;
|
31
|
+
|
32
|
+
cite { display: block; font-size: .8rem; }
|
33
|
+
cite:before { content: "\2014 \00A0"; /* em dash */ }
|
34
|
+
|
35
|
+
@include content-spacing;
|
36
|
+
}
|
37
|
+
|
38
|
+
mark {
|
39
|
+
display: inline-block;
|
40
|
+
background: $gray-dark;
|
41
|
+
border-radius: 2px;
|
42
|
+
padding: 0 5px;
|
43
|
+
}
|
44
|
+
|
45
|
+
.text-muted { color: $default; }
|
46
|
+
.text-info { color: shade($info, 15%); }
|
47
|
+
.text-error { color: shade($error, 15%); }
|
48
|
+
.text-warning { color: shade($warning, 15%); }
|
49
|
+
.text-success { color: shade($success, 15%); }
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
$grid-columns: 12 !default;
|
3
|
+
$grid-width: (100% / $grid-columns) !default;
|
4
|
+
|
5
|
+
// Calculate a width using a grid cell
|
6
|
+
@function grid-span($n) {
|
7
|
+
@return $grid-width * $n;
|
8
|
+
}
|
9
|
+
|
10
|
+
// Styles for the row containing the columns
|
11
|
+
@mixin grid-row() {
|
12
|
+
text-align: left;
|
13
|
+
width: 100%;
|
14
|
+
max-width: 100%;
|
15
|
+
|
16
|
+
@include clear-fix;
|
17
|
+
}
|
18
|
+
|
19
|
+
// Styles for the column
|
20
|
+
@mixin grid-column() {
|
21
|
+
position: relative;
|
22
|
+
min-height: 1px;
|
23
|
+
float: left;
|
24
|
+
}
|
@@ -0,0 +1,90 @@
|
|
1
|
+
|
2
|
+
$padding: .75rem !default;
|
3
|
+
$margin: 1.25rem !default;
|
4
|
+
|
5
|
+
$small-size: .7rem !default;
|
6
|
+
$small-padding: .5rem !default;
|
7
|
+
|
8
|
+
$medium-size: inherit !default;
|
9
|
+
$medium-padding: $padding !default;
|
10
|
+
|
11
|
+
$large-size: 1.3rem !default;
|
12
|
+
$large-padding: 1rem !default;
|
13
|
+
|
14
|
+
// Container clear fix for floats
|
15
|
+
@mixin clear-fix {
|
16
|
+
&:after {
|
17
|
+
content: "";
|
18
|
+
display: block;
|
19
|
+
height: 0;
|
20
|
+
line-height: 0;
|
21
|
+
clear: both;
|
22
|
+
visibility: hidden;
|
23
|
+
}
|
24
|
+
}
|
25
|
+
|
26
|
+
// Reset an inline-block element to defaults
|
27
|
+
@mixin reset-inline-block {
|
28
|
+
display: inline-block;
|
29
|
+
border: 0;
|
30
|
+
margin: 0;
|
31
|
+
padding: 0;
|
32
|
+
position: relative;
|
33
|
+
text-decoration: none;
|
34
|
+
vertical-align: middle;
|
35
|
+
}
|
36
|
+
|
37
|
+
// Remove the top and bottom margin from content elements
|
38
|
+
// Allows for perfect spacing within content blocks
|
39
|
+
@mixin content-spacing {
|
40
|
+
p, ul, ol, hr, blockquote {
|
41
|
+
&:first-child { margin-top: 0; }
|
42
|
+
&:last-child { margin-bottom: 0; }
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
//-------------------- Sizes --------------------//
|
47
|
+
|
48
|
+
@mixin size-small {
|
49
|
+
font-size: $small-size;
|
50
|
+
padding: $small-padding;
|
51
|
+
}
|
52
|
+
|
53
|
+
@mixin size-medium {
|
54
|
+
font-size: $medium-size;
|
55
|
+
padding: $medium-padding;
|
56
|
+
}
|
57
|
+
|
58
|
+
@mixin size-large {
|
59
|
+
font-size: $large-size;
|
60
|
+
padding: $large-padding;
|
61
|
+
}
|
62
|
+
|
63
|
+
//-------------------- States --------------------//
|
64
|
+
|
65
|
+
// Contains hover and active styles (on self or inherited from parent)
|
66
|
+
@mixin active-state {
|
67
|
+
.is-active > &,
|
68
|
+
&:hover,
|
69
|
+
&.is-active,
|
70
|
+
&.is-active:hover { @content; }
|
71
|
+
}
|
72
|
+
|
73
|
+
// Contains disabled styles (on self or inherited from parent)
|
74
|
+
@mixin disabled-state {
|
75
|
+
.is-disabled > &,
|
76
|
+
&.is-disabled,
|
77
|
+
&.is-disabled:hover,
|
78
|
+
&[disabled],
|
79
|
+
&[disabled]:hover { @content; }
|
80
|
+
}
|
81
|
+
|
82
|
+
//-------------------- Helpers --------------------//
|
83
|
+
|
84
|
+
@function black($opacity){
|
85
|
+
@return rgba(0, 0, 0, $opacity);
|
86
|
+
}
|
87
|
+
|
88
|
+
@function white($opacity){
|
89
|
+
@return rgba(255, 255, 255, $opacity);
|
90
|
+
}
|
@@ -0,0 +1,111 @@
|
|
1
|
+
|
2
|
+
$responsive-design: "mobile" !default;
|
3
|
+
$breakpoint-desktop: 1440px !default;
|
4
|
+
$breakpoint-laptop: 1280px !default;
|
5
|
+
$breakpoint-tablet-landscape: 1024px !default;
|
6
|
+
$breakpoint-tablet-portrait: 768px !default;
|
7
|
+
$breakpoint-mobile-landscape: 480px !default;
|
8
|
+
$breakpoint-mobile-portrait: 320px !default;
|
9
|
+
|
10
|
+
@mixin if-min($min) {
|
11
|
+
@media only screen and (min-width: $min) {
|
12
|
+
@content;
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
@mixin if-max($max) {
|
17
|
+
@media only screen and (max-width: $max) {
|
18
|
+
@content;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
@mixin if-min-max($min, $max) {
|
23
|
+
@media only screen and (min-width: $min) and (max-width: $max) {
|
24
|
+
@content;
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
@mixin if-landscape {
|
29
|
+
@media only screen and (orientation: landscape) {
|
30
|
+
@content;
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
@mixin if-portrait {
|
35
|
+
@media only screen and (orientation: portrait) {
|
36
|
+
@content;
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
// Either support desktop-first or mobile-first responsive pattern
|
41
|
+
@mixin do-responsive($desktop, $mobile) {
|
42
|
+
@if $responsive-design == "desktop" {
|
43
|
+
@if $desktop {
|
44
|
+
@include if-max($desktop) {
|
45
|
+
@content;
|
46
|
+
}
|
47
|
+
} @else {
|
48
|
+
@content;
|
49
|
+
}
|
50
|
+
} @else {
|
51
|
+
@if $mobile {
|
52
|
+
@include if-min($mobile) {
|
53
|
+
@content;
|
54
|
+
}
|
55
|
+
} @else {
|
56
|
+
@content;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
//-------------------- Breakpoints --------------------//
|
62
|
+
|
63
|
+
// Uses min or max
|
64
|
+
@mixin if-desktop {
|
65
|
+
@include do-responsive(null, $breakpoint-tablet-landscape) {
|
66
|
+
@content;
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
@mixin if-tablet-landscape {
|
71
|
+
@include do-responsive($breakpoint-tablet-landscape, $breakpoint-tablet-portrait) {
|
72
|
+
@content;
|
73
|
+
}
|
74
|
+
}
|
75
|
+
|
76
|
+
@mixin if-tablet-portrait {
|
77
|
+
@include do-responsive($breakpoint-tablet-portrait, $breakpoint-mobile-landscape) {
|
78
|
+
@content;
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
@mixin if-mobile-landscape {
|
83
|
+
@include do-responsive($breakpoint-mobile-landscape, $breakpoint-mobile-portrait) {
|
84
|
+
@content;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
@mixin if-mobile-portrait {
|
89
|
+
@include do-responsive($breakpoint-mobile-portrait, null) {
|
90
|
+
@content;
|
91
|
+
}
|
92
|
+
}
|
93
|
+
|
94
|
+
// Within 2 ranges
|
95
|
+
@mixin in-desktop {
|
96
|
+
@include if-min($breakpoint-tablet-landscape + 1) {
|
97
|
+
@content;
|
98
|
+
}
|
99
|
+
}
|
100
|
+
|
101
|
+
@mixin in-tablet {
|
102
|
+
@include if-min-max($breakpoint-mobile-landscape + 1, $breakpoint-tablet-landscape) {
|
103
|
+
@content;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
@mixin in-mobile {
|
108
|
+
@include if-max($breakpoint-mobile-landscape) {
|
109
|
+
@content;
|
110
|
+
}
|
111
|
+
}
|