Skip to content

Commit 0ebb7e0

Browse files
author
Jeff Escalante
committed
Merge pull request #210 from jenius/remove-nib
Remove Nib
2 parents bb4da6f + 2dff1a4 commit 0ebb7e0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+497
-716
lines changed

axis/buttons.styl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// ex. highlight: .7
1313

1414
-highlight($strength = .3)
15-
box-shadow(s("inset 0 1px 0 %s", rgba(255,255,255,$strength)))
15+
box-shadow: s("inset 0 1px 0 %s", rgba(255,255,255,$strength))
1616

1717
// Function: parse
1818
// Used internally for setting button sizes.
@@ -142,7 +142,7 @@ glossy-button($color = $default-color, $size = "medium", $text-color = null, $sh
142142
text-shadow: 1px 1px 1px $hover-color
143143

144144
&:active
145-
box-shadow(s("inset 0 1px %s %s", $parsed-size/2.6px, rgba(darken($color, 25%),.6)))
145+
box-shadow: s("inset 0 1px %s %s", $parsed-size/2.6px, rgba(darken($color, 25%),.6))
146146
text-shadow: $down-shadow
147147
border-color: darken($color, 18%)
148148

axis/forms.styl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
-focus-glow($color = $default-color)
99
&:focus
10-
box-shadow(0 0 5px rgba($color,.7))
10+
box-shadow: 0 0 5px rgba($color,.7)
1111
border: 1px solid desaturate($color, 35%)
1212
outline: none
1313

@@ -22,7 +22,7 @@
2222
// ex. input: #D45D86 400px
2323

2424
input($color = $aqua, $width = 250px)
25-
box-shadow(inset 0 1px 1px rgba(#000, 0.1))
25+
box-shadow: inset 0 1px 1px rgba(#000, 0.1)
2626
-webkit-font-smoothing: antialiased
2727
font-size: unit($font-size, 'px')
2828
font-family: $font-stack
@@ -35,7 +35,6 @@ input($color = $aqua, $width = 250px)
3535
width: $width
3636
text-shadow: 0 0 1px rgba(#fff, .1)
3737
transition()
38-
pie()
3938
if color
4039
-focus-glow($color)
4140
else

axis/gradients.styl

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,7 @@ gradient($color1, $color2 = null, $strength = 10%)
2121
$start = $color2 ? $color1 : lighten($color1, $strength)
2222
$end = $color2 ? $color2 : darken($color1, $strength)
2323
background: $start
24-
background: $end linear-gradient(top, $start, $end) repeat-x
25-
if $pie-enabled
26-
-pie-background: unquote('linear-gradient(top,') $start unquote(' 0%, ') $end unquote('end 100%)')
27-
pie()
24+
background: $end linear-gradient(180deg, $start, $end) repeat-x
2825

2926
// Mixin: Image Gradient
3027
//
@@ -45,7 +42,4 @@ image-gradient($color1, $color2 = null, $image-path = 'noise.png', $strength = 1
4542
$start = $color2 ? $color1 : lighten($color1, $strength)
4643
$end = $color2 ? $color2 : darken($color1, $strength)
4744
background: $start
48-
background: url($img-path $image-path) repeat, $end linear-gradient(top, $start, $end) repeat-x
49-
if $pie-enabled
50-
-pie-background: unquote('linear-gradient(top,') $start unquote(' 0%, ') $end unquote('end 100%)')
51-
pie()
45+
background: url($img-path $image-path) repeat, $end linear-gradient(180deg, $start, $end) repeat-x

axis/index.styl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
@import 'settings'
66
@import 'reset'
7-
@import 'vendor'
87
@import 'utilities'
98
@import 'gradients'
109
@import 'images'

axis/layout.styl

Lines changed: 59 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,55 @@
1-
// Alias: group
2-
// Clearfix with a better name. Excellent for wrangling floats.
1+
// Mixin: group
2+
// Clearfix with a better name. Excellent for wrangling floats. Taken from
3+
// http://www.cssmojo.com/latest_new_clearfix_so_far/
4+
// Does not support IE 6 and 7 because you should not support them either.
5+
6+
group()
7+
&:after
8+
content: ""
9+
display: table
10+
clear: both
11+
12+
// Alias: clearfix
13+
// Group with a worse name. If you need really can't break the habit.
14+
clearfix = group
15+
16+
// Function: pos
17+
// Backs position helpers, found below
18+
-pos(type, args)
19+
i = 0
20+
position: unquote(type)
21+
for j in (1..4)
22+
if length(args) > i
23+
{args[i]}: args[i + 1] is a 'unit' ? args[i += 1] : 0
24+
i += 1
25+
26+
// Mixin: Positions
27+
// Syntax shortcuts for absolute, relative, and fixed positioning. Ported
28+
// from nib: https://github.com/tj/nib/blob/master/lib/nib/positions.styl
29+
30+
fixed()
31+
-pos('fixed', arguments)
32+
33+
absolute()
34+
-pos('absolute', arguments)
35+
36+
relative()
37+
-pos('relative', arguments)
38+
39+
// Mixin: Size
40+
// Shortcut for setting width and height quickly. If passed one value, sets this
41+
// value as both width and height.
42+
//
43+
// ex. size: 10px 30px
44+
// ex. size: 10px
345

4-
group = clearfix
46+
size()
47+
if length(arguments) == 1
48+
width: arguments[0]
49+
height: arguments[0]
50+
else
51+
width: arguments[0]
52+
height: arguments[1]
553

654
// Mixin: Columns
755
//
@@ -30,19 +78,6 @@ columns($count = 3, $gap = 30px, $width = null, $rule = null)
3078
avoid-column-break()
3179
column-break-inside: avoid
3280

33-
// Alias: Inline Block
34-
// Cross browser inline block display. Saves many IE headaches.
35-
36-
inline-block()
37-
display: inline-block
38-
39-
if support-for-ie
40-
display: -moz-inline-stack
41-
vertical-align: baseline
42-
zoom: 1
43-
*display: inline
44-
*vertical-align: auto
45-
4681
// Mixin: Vertically Align
4782
// Cross browser vertical align. Works down to IE9.
4883
//
@@ -73,24 +108,24 @@ vertically-align($reset = null)
73108
// direct children. The first one will float to the left, the second one will be
74109
// to the right of the first, and third will go farthest right.
75110
//
76-
// ex. media()
77-
// ex. media: 15px
78-
// ex. media: 15px 10px
111+
// ex. media-object()
112+
// ex. media-object: 15px
113+
// ex. media-object: 15px 10px
79114

80-
media($margin = 10px)
115+
media-object($margin = 10px)
81116

82117
$left-margin = $margin
83118
$right-margin = $margin
84119

85-
if length($arguments) > 1
86-
$left-margin = $arguments[0]
87-
$right-margin = $arguments[1]
120+
if length(arguments) > 1
121+
$left-margin = arguments[0]
122+
$right-margin = arguments[1]
88123

89124
overflow: hidden
90125
zoom: 1
91126

92127
& > *
93-
inline-block()
128+
display: inline-block
94129
overflow: hidden
95130
& > *:first-child
96131
float: left

axis/reset.styl

Lines changed: 80 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,86 @@
22
// Reset
33
// -----
44

5-
// global-reset delegated to nib
6-
7-
$support-for-ie ?= true
5+
// Global Reset
6+
// Based on [Eric Meyer's reset](http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/)
7+
// ported from Nib
8+
9+
global-reset()
10+
html, body, div, span, applet, object, iframe,
11+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
12+
a, abbr, acronym, address, big, cite, code,
13+
del, dfn, em, img, ins, kbd, q, s, samp,
14+
small, strike, strong, sub, sup, tt, var,
15+
dl, dt, dd, ol, ul, li,
16+
fieldset, form, label, legend,
17+
table, caption, tbody, tfoot, thead, tr, th, td
18+
reset-box-model()
19+
reset-font()
20+
body
21+
reset-body()
22+
ol, ul
23+
list-style: none
24+
table
25+
reset-table()
26+
caption, th, td
27+
reset-table-cell()
28+
a img
29+
border: none
30+
31+
nested-reset()
32+
div, span, object, iframe, h1, h2, h3, h4, h5, h6, p,
33+
pre, a, abbr, acronym, address, code, del, dfn, em, img,
34+
dl, dt, dd, ol, ul, li, fieldset, form, label,
35+
legend, caption, tbody, tfoot, thead, tr
36+
reset-box-model()
37+
reset-font()
38+
table
39+
reset-table()
40+
caption, th, td
41+
reset-table-cell()
42+
a img
43+
border: none
44+
45+
reset-box-model()
46+
margin: 0
47+
padding: 0
48+
border: 0
49+
outline: 0
50+
51+
reset-font()
52+
font-weight: inherit
53+
font-style: inherit
54+
font-family: inherit
55+
font-size: 100%
56+
vertical-align: baseline
57+
58+
reset-body()
59+
line-height: 1
60+
color: black
61+
background: white
62+
63+
reset-table()
64+
border-collapse: separate
65+
border-spacing: 0
66+
vertical-align: middle
67+
68+
reset-table-cell()
69+
text-align: left
70+
font-weight: normal
71+
vertical-align: middle
72+
73+
reset-html5()
74+
article, aside, canvas, details, figcaption,
75+
figure, footer, header, hgroup, menu, nav,
76+
section, summary, main
77+
reset-box-model()
78+
display: block
79+
audio, canvas, video
80+
display inline-block
81+
*display inline
82+
*zoom 1
83+
audio:not([controls]),[hidden]
84+
display none
885

986
// Mixin: Normalize CSS
1087
// Based on v3.0.1 https://github.com/necolas/normalize.css

axis/settings.styl

Lines changed: 18 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -34,48 +34,33 @@ $silver = #DDDDDD
3434
$gray = #AAAAAA
3535
$black = #222222
3636

37-
//Use as default HTML colors
38-
navy = $navy
39-
blue = $blue
40-
aqua = $aqua
41-
teal = $teal
42-
olive = $olive
43-
green = $green
44-
lime = $lime
45-
yellow = $yellow
46-
orange = $orange
47-
red = $red
48-
maroon = $maroon
37+
// Use as default HTML colors
38+
navy = $navy
39+
blue = $blue
40+
aqua = $aqua
41+
teal = $teal
42+
olive = $olive
43+
green = $green
44+
lime = $lime
45+
yellow = $yellow
46+
orange = $orange
47+
red = $red
48+
maroon = $maroon
4949
fuchsia = $fuchsia
50-
purple = $purple
51-
white = $white
52-
silver = $silver
53-
gray = $gray
54-
black = $black
50+
purple = $purple
51+
white = $white
52+
silver = $silver
53+
gray = $gray
54+
black = $black
5555

5656
// Default color
5757
$default-color = $blue
5858

5959
// Text highlight color
6060
$highlight-color = $blue
6161

62-
// Custom image base path for roots mixins
62+
// Custom image base path for axis mixins
6363
$img-path = ''
6464

65-
// Support for old IE
66-
support-for-ie = $support-for-ie // Needed until we port/drop nib
67-
$support-for-ie = false
68-
6965
// Ligatures
7066
$ligatures = false
71-
72-
// Vertical rhythm
73-
$base-line-height = 24px
74-
$default-rhythm-border-style = solid
75-
$relative-font-sizing = true
76-
$round-to-nearest-half-line = false
77-
$min-line-padding = 2px
78-
79-
// Progressive IE (http://css3pie.com/)
80-
$pie-enabled = false
81-
$pie-path = '/pie.htc'

axis/typography.styl

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,20 @@ font-face($name, $folder, $weight = 'normal', $style = 'normal')
4747
font-weight: unquote($weight)
4848
font-style: unquote($style)
4949

50+
51+
// Mixin: Ellipsis
52+
// Truncate text to the width of its container...
53+
// ex: ellipsis()
54+
// ex: ellipsis: 300px
55+
56+
ellipsis($width = 100%)
57+
white-space: nowrap
58+
display: inline-block
59+
max-width: 100%
60+
overflow: hidden
61+
text-overflow: ellipsis
62+
word-wrap: normal
63+
5064
// Function: Line Height
5165
//
5266
// If there is a font-size set on the parent element, adjusts the line height to
@@ -56,7 +70,7 @@ font-face($name, $folder, $weight = 'normal', $style = 'normal')
5670
if @font-size
5771
line-height: 1.6em
5872
else
59-
line-height: unit(font-size*1.6, 'px')
73+
line-height: unit($font-size*1.6, 'px')
6074
line-height: 1.6rem
6175

6276
// Mixin: Text Margin
@@ -381,6 +395,17 @@ hyphenation()
381395
-webkit-hyphenate-after: 3
382396
hyphenate-lines: 3
383397

398+
// Mixin: Shadow Stroke
399+
//
400+
// Creates a text outline using text-shadow. Ported from nib.
401+
// Takes a color.
402+
//
403+
// ex: shadow-stroke()
404+
// ex: sahdow-stroke(red)
405+
406+
shadow-stroke($color = $blue)
407+
text-shadow: -1px -1px 0 $color, 1px -1px 0 $color, -1px 1px 0 $color, 1px 1px 0 $color
408+
384409
// Additive Mixin: Base
385410
//
386411
// WARNING: Creates classes in your css and styles them - not to be used inside

0 commit comments

Comments
 (0)