Refactor CSS

pull/185/head
Thibaut 10 years ago
parent b29d6ca002
commit bec7ebbfea

@ -35,27 +35,21 @@
'pages/chai',
'pages/clojure',
'pages/coffeescript',
'pages/cordova',
'pages/d3',
'pages/ember',
'pages/express',
'pages/git',
'pages/go',
'pages/haskell',
'pages/jquery',
'pages/knockout',
'pages/git',
'pages/grunt',
'pages/laravel',
'pages/less',
'pages/lua',
'pages/marionette',
'pages/markdown',
'pages/maxcdn',
'pages/mdn',
'pages/meteor',
'pages/modernizr',
'pages/moment',
'pages/mongoose',
'pages/nginx',
'pages/node',
'pages/php',

@ -35,27 +35,21 @@
'pages/chai',
'pages/clojure',
'pages/coffeescript',
'pages/cordova',
'pages/d3',
'pages/ember',
'pages/express',
'pages/git',
'pages/go',
'pages/haskell',
'pages/jquery',
'pages/knockout',
'pages/git',
'pages/grunt',
'pages/laravel',
'pages/less',
'pages/lua',
'pages/marionette',
'pages/markdown',
'pages/maxcdn',
'pages/mdn',
'pages/meteor',
'pages/modernizr',
'pages/moment',
'pages/mongoose',
'pages/nginx',
'pages/node',
'pages/php',

@ -1,10 +1,7 @@
%simple {
padding-left: 1rem;
h1, h2, h3 {
position: relative;
left: -1rem;
}
h1, h2, h3 { margin-left: -1rem; }
h2 { @extend %block-heading; }
h3 { @extend %block-label, %label-blue; }
h4 { font-size: inherit; }
@ -12,14 +9,21 @@
._mobile & {
padding-left: 0;
h1, h2, h3 { left: 0; }
h1, h2, h3 { margin-left: 0; }
}
code { @extend %label; }
p > code, li > code { @extend %label; }
blockquote { @extend %note; }
}
._cordova,
._grunt,
._less,
._lodash,
._sinon,
._mocha {
._marionette,
._markdown,
._mocha,
._mongoose,
._sinon {
@extend %simple;
}

@ -1,13 +1,5 @@
._chai {
padding-left: 1rem;
> h1, > h2, h3 { margin-left: -1rem; }
> h2 { @extend %block-heading; }
h3 { @extend %block-label, %label-blue; }
h4 { font-size: 1em; }
code { @extend %label; }
blockquote { @extend %note; }
@extend %simple;
li.tag span { margin-right: 5px; }
}

@ -1,10 +1,5 @@
._coffeescript {
padding-left: 1rem;
> h1, > h2 { margin-left: -1rem; }
> h2 { @extend %block-heading; }
code { @extend %label; }
@extend %simple;
// CoffeeScript / JavaScript code blocks
> .code {

@ -1,10 +0,0 @@
._cordova {
padding-left: 1rem;
> h1, > h2 { margin-left: -1rem; }
> h2 { @extend %block-heading; }
> h3 { font-size: 1rem; }
code { @extend %label; }
blockquote { @extend %note; }
}

@ -1,10 +1,6 @@
._express {
padding-left: 1rem;
@extend %simple;
h1, h2, h3 { margin-left: -1rem; }
h2 { @extend %block-heading; }
h3 { @extend %block-label, %label-blue; }
p > code { @extend %label; }
.doc-box { @extend %note; }
.doc-warn { @extend %note-red; }
}

@ -1,7 +1,5 @@
._go {
padding-left: 1rem;
@extend %simple;
h1, h2, #short-nav, table.dir { margin-left: -1rem; }
h2 { @extend %block-heading; }
h3 { @extend %block-label, %label-blue; }
#short-nav, table.dir { margin-left: -1rem; }
}

@ -1,8 +0,0 @@
._grunt {
padding-left: 1rem;
h1, h2, h3 { margin-left: -1rem; }
h2 { @extend %block-heading; }
h3 { @extend %block-label, %label-blue; }
p > code { @extend %label; }
}

@ -1,8 +0,0 @@
._less {
padding-left: 1rem;
> h1, > h2, h3, h4 { margin-left: -1rem; }
> h2 { @extend %block-heading; }
h3, h4 { @extend %block-label, %label-blue; }
code { @extend %label; }
}

@ -1,10 +1,5 @@
._lua {
padding-left: 1rem;
h1, h2 { margin-left: -1rem; }
h2 { @extend %block-heading; }
h3 { @extend %block-label, %label-blue; }
h4 { font-size: inherit; }
@extend %simple;
.apii { float: right; }
}

@ -1,8 +0,0 @@
._marionette {
padding-left: 1rem;
> h1, > h2 { margin-left: -1rem; }
> h2 { @extend %block-heading; }
> h3 { @extend %block-label, %label-blue; }
blockquote { @extend %note; }
}

@ -1,7 +0,0 @@
._markdown {
padding-left: 1rem;
h1, h2, h3, h1 + ul { margin-left: -1rem; }
h2 { @extend %block-heading; }
h3 { @extend %block-label, %label-blue; }
}

@ -1,11 +1,5 @@
._maxcdn {
padding-left: 1rem;
h1, h2, h3 { margin-left: -1rem; }
h2 { @extend %block-heading; }
h3 { @extend %block-label, %label-blue; }
h4 { font-size: 1em; }
p > code { @extend %label; }
@extend %simple;
.url {
padding: .5rem;

@ -1,8 +0,0 @@
._mongoose {
padding-left: 1rem;
> h1, > h2, > h3 { margin-left: -1rem; }
> h2 { @extend %block-heading; }
> h3 { @extend %block-label, %label-blue; }
h4 { font-size: 1em; }
}

@ -1,10 +1,5 @@
._requirejs {
padding-left: 1rem;
h1, h2, h3, ul.index { margin-left: -1rem; }
h2 { @extend %block-heading; }
h3 { @extend %block-label, %label-blue; }
h4 { font-size: 1em; }
@extend %simple;
ul.index ul { margin: .5em 0; }
}

@ -22,7 +22,7 @@ module Docs
end
css('h1, h2, h3, h4').each do |node|
node.name = node.name.sub(/\d/) { |i| i.to_i + 1 }
node.name = node.name.sub(/\d/) { |i| [i.to_i + 1, 3].min }
end
css('pre').each do |node|

@ -23,7 +23,7 @@ module Docs
end
css('h3[id^="import-options-"]').each do |node|
entries << ["@import #{node.content}", node['id']]
entries << ["@import #{node.content}", node['id']] unless node.content =~ /example/i
end
entries.concat [
@ -52,7 +52,7 @@ module Docs
if node.name == 'h2'
type = node.content
type.sub! %r{(.+) Functions}, 'Functions: \1'
elsif node.name == 'h4'
elsif node.name == 'h3'
entries << [node.content, node['id'], type]
end
end

Loading…
Cancel
Save