Skip to content

Commit

Permalink
Merge branch 'master' of github.com:visionmedia/nib into gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jul 7, 2012
2 parents 3f436b0 + d127c82 commit 5214422
Show file tree
Hide file tree
Showing 38 changed files with 469 additions and 505 deletions.
63 changes: 63 additions & 0 deletions History.md
@@ -1,4 +1,67 @@

0.6.0 / 2012-07-05
==================

* add support for `linear-gradient(stops...)`. Closes #110
* replace hide-text() w/ text-indent: 100% method

0.5.0 / 2012-05-28
==================

* Added perspective-origin property
* Added tab-size property
* Updated stylus dependency, fixes #89
* Update opacity to clear issue with IE rendering value of 100 (to override previous semi-opaque state) and support IE5-8 in all the different varieties of life (http://www.quirksmode.org/css/opacity.html)
* Deprecated a couple EOL moz prefixes, removed -o-background-size
* Remove duplicate imports and defines (fixes #81)
* Refactored background-clip, added background-origin.
* Preserving importance for opacity

0.4.1 / 2012-04-15
==================

* There is a moz-box-flex-group actually [kizu]
* There were no importance for overflow [kizu]
* Appearance is only webkit/moz now [kizu]
* Still no hyphens in Opera [kizu]
* There would be animations in IE10 and probably (there were an experimental build of it) in Opera 12) [kizu]
* Updated fexbox prefixes (flex-group is only in webkit, no ordinal-group in Opera) [kizu]
* 3D transforms now in IE10 and in Fx, but still not in Opera [kizu]
* There would be transitions in IE10 [kizu]
* Fixed the background-clip prefixes: it have different syntax for old webkit and moz, also it have only webkit for text [kizu]
* Added column-span and column-fill [kizu]
* Correct prefixes for column-clip, moved it in place with other column- props [kizu]
* There would be -ms-user-select in IE10 [kizu]

0.4.0 / 2012-04-03
==================

* Added `box-ordinal-group` support [panosru]
* Added `transform-origin` support [panosru]
* Added `perspective` support
* Added `transform-style` support
* Added `display: box` vendor support
* Removed buttons
* Changed: use mocha for test runner

0.3.2 / 2012-01-09
==================

* Remove `<font>` from the `global-reset()` helper [TooTallNate]

0.3.1 / 2011-11-30
==================

* Added vendor `appearance` property
* Updated `replace()`
* Fixed tests

0.3.0 / 2011-11-17
==================

* Added support for o and ms prefixes to text-overflow helper [Ian Storm]
* Added "overflow: ellipsis" support [Ian Storm]

0.2.0 / 2011-08-26
==================

Expand Down
5 changes: 4 additions & 1 deletion Makefile
@@ -1,6 +1,9 @@

test:
@node test/runner.js test/cases/*.styl
@./node_modules/.bin/mocha \
--require should \
--ignore-leaks \
test/runner.js

test-server:
@node test/server.js
Expand Down
6 changes: 2 additions & 4 deletions Readme.md
@@ -1,8 +1,6 @@
# Nib

Stylus mixins, utilities, components, and gradient image generation. CSS is your bitch!

__NOTE__: better docs coming soon
Stylus mixins, utilities, components, and gradient image generation. Don't forget to check out the [documentation](http://visionmedia.github.com/nib/).

## Installation

Expand Down Expand Up @@ -52,7 +50,7 @@ server.use(stylus.middleware({

```css
@import 'nib/gradients'
@import 'nib/buttons'
@import 'nib/overflow'
```

to be continued....
Expand Down
2 changes: 2 additions & 0 deletions index.styl
@@ -0,0 +1,2 @@

@import 'lib/nib/'
2 changes: 1 addition & 1 deletion lib/nib.js
Expand Up @@ -31,7 +31,7 @@ try {
* Library version.
*/

exports.version = '0.2.0';
exports.version = '0.6.0';

/**
* Stylus path.
Expand Down
11 changes: 11 additions & 0 deletions lib/nib/border.styl
@@ -0,0 +1,11 @@

/*
* border: <color>
* border: ...
*/

border(color)
if color is a 'color'
border: 1px solid color
else
border: arguments
28 changes: 17 additions & 11 deletions lib/nib/box.styl
@@ -1,8 +1,18 @@

/*
* Vendor "display: box" support.
*/

display(type)
if box == type
display: vendor-value(type)
else
display: type

/*
*
* Synopsis:
*
* box: orient direction
* box: <orient> [direction]
*
* Examples:
*
Expand All @@ -11,12 +21,8 @@
*
*/

box(args)
for prefix in vendor-prefixes
if official == prefix
{display}: box
else
{display}: unquote('-') + prefix + '-box'
box-orient: arguments[0]
if arguments[1]
box-direction: arguments[1]
box(args...)
display: box
box-orient: args[0]
if args[1]
box-direction: args[1]
186 changes: 0 additions & 186 deletions lib/nib/buttons.styl

This file was deleted.

3 changes: 1 addition & 2 deletions lib/nib/config.styl
@@ -1,4 +1,3 @@

/*
* Support for ie defaulting to true.
*/
Expand All @@ -9,4 +8,4 @@ support-for-ie = true
* Default vendor prefixes.
*/

vendor-prefixes ?= webkit moz official
vendor-prefixes ?= webkit moz o ms official
13 changes: 10 additions & 3 deletions lib/nib/gradients.styl
Expand Up @@ -8,11 +8,13 @@
replace(expr, str, val)
expr = clone(expr)
for e, i in expr
if str == e
expr[i] = val
if length(e) > 1
expr[i] = replace(e, str, val)
else
if str == e
expr[i] = val
expr


/*
* Normalize gradient points.
*/
Expand Down Expand Up @@ -105,6 +107,11 @@ linear-gradient(start, stops...)
error('color stops required') unless length(stops)
prop = current-property[0]
val = current-property[1]

if start is a 'color'
unshift(stops, start)
start = top

stops = normalize-stops(stops)

// gradient image
Expand Down

0 comments on commit 5214422

Please sign in to comment.