Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

A bit of styles refactoring

  • Loading branch information...
commit 47d9a7f92a754201bbf5cbf7d4a0d40f24ec4486 1 parent 45ae23e
@MadRabbit authored
Showing with 15 additions and 10 deletions.
  1. +1 −1  CHANGELOG
  2. +1 −1  README.md
  3. +11 −6 main.sass
  4. +2 −2 src/colorifier.coffee
View
2  CHANGELOG
@@ -1,6 +1,6 @@
2011-08-16 Nikolay Nemshilov
- * Default stylesheet adjsutments
+ * Default stylesheet adjustments
* FF support fix
* HTML highlighter fix for empty `SCRIPT` tags
* Rename `colorifer` -> `colorifier`
View
2  README.md
@@ -21,7 +21,7 @@ There are a bunch of options you might change if you like
Lovely(['colorifier'], function(Colorifier) {
Colorifier.Options.tag = 'pre'; // the tag name of the target elements
Colorifier.Options.attr = 'data-lang'; // the attribute with language
- Colorifier.Options.scheme = 'default'; // the color scheme to use
+ Colorifier.Options.theme = 'light'; // the color theme to use ('light' or 'dark')
Colorifier.Options.gutter = true; // show/hide the gutter
});
View
17 main.sass
@@ -28,7 +28,7 @@ div.colorifier, div.colorifier *
div.colorifier
display: block
position: relative
- border: 1px solid rgba(0,0,0,0.1)
+ border: 1px solid grey
border-radius: .5em
white-space: nowrap
min-width: 30em
@@ -39,9 +39,8 @@ div.colorifier
padding: .25em .5em
.gutter
- border-right: 2px solid rgba(80,0,0,0.5)
+ border-right: 2px solid grey
text-align: right
- background: rgba(0,0,0,0.05)
border-top-left-radius: .5em
border-bottom-left-radius: .5em
@@ -51,9 +50,15 @@ div.colorifier
// default color scheme
- &.default
- color: rgba(0,0,0,0.8)
- background: rgba(255,255,255,0.5)
+ &.light
+ color: rgba(0,0,0,0.8)
+ background: rgba(255,255,255,0.5)
+ border-color: rgba(0,0,0,0.1)
+
+ .gutter
+ border-color: rgba(80,0,0,0.5)
+ background: rgba(0,0,0,0.05)
+
span.comment
color: rgba(0,0,0,0.4)
View
4 src/colorifier.coffee
@@ -9,7 +9,7 @@ class Colorifier extends Element
Options:
tag: 'pre' # tag name of the elements to process
attr: 'data-lang' # attribute that keeps the language name
- scheme: 'default' # colorscheme name
+ theme: 'light' # color theme name
gutter: true # show or not the gutter
# mass-initializer
@@ -56,7 +56,7 @@ class Colorifier extends Element
@insert(new Element('div', class: 'gutter', html: nums.join('<br/>')))
@insert(new Element('div', class: 'code').insert(element))
- @addClass(Colorifier.Options.scheme)
+ @addClass(Colorifier.Options.theme)
Please sign in to comment.
Something went wrong with that request. Please try again.