1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-26 12:18:51 -05:00

Introducing extra.less and using Less CSS for higher flexibility.

This will reduce the amount of copy paste involved when performing
slight changes to the default color sets.

These Ruby gems are required for generating extra.css from extra.less:
gem install less therubyracer

Please run this command to regenerate extra.css:
lessc --compress extra.less > extra.css
This commit is contained in:
Siavash Eliasi 2014-06-02 13:44:44 +04:30 committed by Camilla Berglund
parent 0a4796b2a0
commit dcc3e72d39
2 changed files with 344 additions and 280 deletions

View File

@ -1,280 +1 @@
#navrow1,#navrow2,#navrow3,#navrow4,.tablist a,.tablist a:visited,.tablist a:hover,.tablist li,.tablist li.current a,.memdoc,dl.reflist dd,div.toc li,.ah,span.lineno,span.lineno a,span.lineno a:hover,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,.doxtable code {
background:none;
}
#titlearea,.footer,.contents,div.header,.memdoc,table.doxtable td,table.doxtable th {
border:none;
}
.tablist a,.tablist a:visited,.tablist a:hover,.tablist li,.tablist li.current a,.reflist dt a.el,.levels span,.directory .levels span {
text-shadow:none;
}
.memdoc,dl.reflist dd {
box-shadow:none;
}
div.headertitle,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,table.doxtable code {
padding:0;
}
#nav-path,.directory .levels {
display:none;
}
html,#titlearea,.footer,tr.even,.directory tr.even,.doxtable tr:nth-child(even),.mdescLeft,.mdescRight,.memItemLeft,.memItemRight,code {
background:hsl(0,0%,95%);
}
body {
color:hsl(0,0%,30%);
}
h1,h2,h2.groupheader,h3,div.toc h3,h4,h5,h6,strong,em {
color:hsl(0,0%,10%);
border-bottom:none;
}
.glfwheader {
font-size:16px;
height:64px;
max-width:920px;
min-width:800px;
padding:0 32px;
margin:0 auto;
}
#glfwhome {
line-height:64px;
padding-right:48px;
color:hsl(0,0%,40%);
font-size:2.5em;
background:url("http://www.glfw.org/css/arrow.png") no-repeat right;
}
.glfwnavbar {
list-style-type:none;
margin:0 auto;
float:right;
}
#glfwhome,.glfwnavbar li {
float:left;
}
.glfwnavbar a,.glfwnavbar a:visited {
line-height:64px;
margin-left:2em;
display:block;
color:hsl(0,0%,40%);
}
#glfwhome,.glfwnavbar a,.glfwnavbar a:visited {
transition:.35s ease;
}
#titlearea,.footer {
color:hsl(0,0%,40%);
}
address.footer {
text-align:center;
padding:2em;
margin-top:3em;
}
#top {
background:hsl(0,0%,40%);
}
#navrow1,#navrow2,#navrow3,#navrow4 {
max-width:920px;
min-width:800px;
margin:0 auto;
font-size:13px;
}
.tablist {
height:36px;
display:block;
position:relative;
}
.tablist a,.tablist a:visited,.tablist a:hover,.tablist li,.tablist li.current a {
color:hsl(0,0%,95%);
}
.tablist li.current a {
background:linear-gradient(to bottom,hsl(34,100%,60%) 0%,hsl(24,100%,50%) 100%);
box-shadow:inset 0 0 32px hsl(24,100%,50%);
text-shadow:0 -1px 1px hsl(24,100%,35%);
color:hsl(0,0%,100%);
}
.contents {
min-height:590px;
}
div.contents,div.header {
max-width:920px;
margin:0 auto;
padding:0 32px;
background:hsl(0,0%,100%) none;
}
table.doxtable th,dl.reflist dt {
background:linear-gradient(to bottom,hsl(34,100%,60%) 0%,hsl(24,100%,50%) 100%);
box-shadow:inset 0 0 32px hsl(24,100%,50%);
text-shadow:0 -1px 1px hsl(24,100%,35%);
color:hsl(0,0%,100%);
}
dl.reflist dt a.el {
color:hsl(24,100%,50%);
padding:.2em;
border-radius:4px;
background-color:hsl(24,100%,90%);
}
div.toc {
float:none;
width:auto;
}
div.toc h3 {
font-size:1.17em;
}
div.toc ul {
padding-left:1.5em;
}
div.toc li {
font-size:1em;
padding-left:0;
list-style-type:disc;
}
div.toc,.memproto,div.qindex,div.ah {
background:linear-gradient(to bottom,hsl(0,0%,95%) 0%,hsl(0,0%,90%) 100%);
box-shadow:inset 0 0 32px hsl(0,0%,90%);
text-shadow:0 1px 1px hsl(0,0%,100%);
color:hsl(0,0%,10%);
border:2px solid hsl(0,0%,90%);
border-radius:4px;
}
.memproto a {
color:hsl(24,100%,50%);
}
.memproto td.paramname {
text-shadow:0 1px 1px hsl(0,0%,100%);
}
.paramname {
color:hsl(24,100%,25%);
}
dl.reflist dt {
border:2px solid hsl(24,100%,50%);
border-top-left-radius:4px;
border-top-right-radius:4px;
border-bottom:none;
}
dl.reflist dd {
border:2px solid hsl(24,100%,50%);
border-bottom-right-radius:4px;
border-bottom-left-radius:4px;
border-top:none;
}
table.doxtable {
border-collapse:inherit;
border-spacing:0;
border:2px solid hsl(24,100%,50%);
border-radius:4px;
}
a,a:hover,a:visited,a:visited:hover,.contents a:visited,.el,a.el:visited,#glfwhome:hover,.tablist a:hover,span.lineno a:hover {
color:hsl(24,100%,50%);
text-decoration:none;
}
div.directory {
border-collapse:inherit;
border-spacing:0;
border:2px solid hsl(24,100%,50%);
border-radius:4px;
}
.memSeparator {
height:2px;
border:none;
background:linear-gradient(to right,hsl(0,0%,95%) 0%,hsl(0,0%,85%) 50%,hsl(0,0%,95%) 100%);
}
dl.note,dl.pre,dl.post,dl.invariant {
background:linear-gradient(to bottom,hsl(103,80%,90%) 0%,hsl(103,80%,85%) 100%);
box-shadow:inset 0 0 32px hsl(103,40%,80%);
color:hsl(103,80%,10%);
border:2px solid hsl(103,40%,75%);
}
dl.warning,dl.attention {
background:linear-gradient(to bottom,hsl(34,80%,90%) 0%,hsl(34,80%,85%) 100%);
box-shadow:inset 0 0 32px hsl(34,40%,80%);
color:hsl(34,80%,10%);
border:2px solid hsl(34,40%,75%);
}
dl.deprecated,dl.bug {
background:linear-gradient(to bottom,hsl(333,80%,90%) 0%,hsl(333,80%,85%) 100%);
box-shadow:inset 0 0 32px hsl(333,40%,80%);
color:hsl(333,80%,10%);
border:2px solid hsl(333,40%,75%);
}
dl.todo,dl.test {
background:linear-gradient(to bottom,hsl(200,80%,90%) 0%,hsl(200,80%,85%) 100%);
box-shadow:inset 0 0 32px hsl(200,40%,80%);
color:hsl(200,80%,10%);
border:2px solid hsl(200,40%,75%);
}
dl.note,dl.pre,dl.post,dl.invariant,dl.warning,dl.attention,dl.deprecated,dl.bug,dl.todo,dl.test {
border-radius:4px;
padding:1em;
text-shadow:0 1px 1px hsl(0,0%,100%);
}
div.fragment,pre.fragment {
background:hsl(0,0%,20%);
border-radius:4px;
border:none;
padding:.5em 2em;
overflow:auto;
border-left:4px solid hsl(0,0%,80%);
}
.lineno a,.lineno a:visited,.line,pre.fragment {
color:hsl(60,30%,96%);
}
a.code,a.code:visited,span.preprocessor,span.comment {
color:hsl(80,76%,53%);
}
span.keyword,span.keywordtype,span.keywordflow {
color:hsl(190,81%,67%);
}
span.stringliteral {
color:hsl(54,70%,68%);
}
code {
padding:.1em;
border-radius:4px;
}
#navrow1,#navrow2,#navrow3,#navrow4,.tablist a,.tablist a:visited,.tablist a:hover,.tablist li,.tablist li.current a,.memdoc,dl.reflist dd,div.toc li,.ah,span.lineno,span.lineno a,span.lineno a:hover,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,.doxtable code{background:none}#titlearea,.footer,.contents,div.header,.memdoc,table.doxtable td,table.doxtable th{border:none}.tablist a,.tablist a:visited,.tablist a:hover,.tablist li,.tablist li.current a,.reflist dt a.el,.levels span,.directory .levels span{text-shadow:none}.memdoc,dl.reflist dd{box-shadow:none}div.headertitle,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,table.doxtable code{padding:0}#nav-path,.directory .levels{display:none}html,#titlearea,.footer,tr.even,.directory tr.even,.doxtable tr:nth-child(even),.mdescLeft,.mdescRight,.memItemLeft,.memItemRight,code{background:#f2f2f2}body{color:#4d4d4d}h1,h2,h2.groupheader,h3,div.toc h3,h4,h5,h6,strong,em{color:#1a1a1a;border-bottom:none}.glfwheader{font-size:16px;height:64px;max-width:920px;min-width:800px;padding:0 32px;margin:0 auto}#glfwhome{line-height:64px;padding-right:48px;color:#666;font-size:2.5em;background:url("http://www.glfw.org/css/arrow.png") no-repeat right}.glfwnavbar{list-style-type:none;margin:0 auto;float:right}#glfwhome,.glfwnavbar li{float:left}.glfwnavbar a,.glfwnavbar a:visited{line-height:64px;margin-left:2em;display:block;color:#666}#glfwhome,.glfwnavbar a,.glfwnavbar a:visited{transition:.35s ease}#titlearea,.footer{color:#666}address.footer{text-align:center;padding:2em;margin-top:3em}#top{background:#666}#navrow1,#navrow2,#navrow3,#navrow4{max-width:920px;min-width:800px;margin:0 auto;font-size:13px}.tablist{height:36px;display:block;position:relative}.tablist a,.tablist a:visited,.tablist a:hover,.tablist li,.tablist li.current a{color:#f2f2f2}.tablist li.current a{background:linear-gradient(to bottom, #ffa733 0, #f60 100%);box-shadow:inset 0 0 32px #f60;text-shadow:0 -1px 1px #b34700;color:#fff}.contents{min-height:590px}div.contents,div.header{max-width:920px;margin:0 auto;padding:0 32px;background:#fff none}table.doxtable th,dl.reflist dt{background:linear-gradient(to bottom, #ffa733 0, #f60 100%);box-shadow:inset 0 0 32px #f60;text-shadow:0 -1px 1px #b34700;color:#fff}dl.reflist dt a.el{color:#f60;padding:.2em;border-radius:4px;background-color:#ffe0cc}div.toc{float:none;width:auto}div.toc h3{font-size:1.17em}div.toc ul{padding-left:1.5em}div.toc li{font-size:1em;padding-left:0;list-style-type:disc}div.toc,.memproto,div.qindex,div.ah{background:linear-gradient(to bottom, #f2f2f2 0, #e6e6e6 100%);box-shadow:inset 0 0 32px #e6e6e6;text-shadow:0 1px 1px #fff;color:#1a1a1a;border:2px solid #e6e6e6;border-radius:4px}.memproto a{color:#f60}.paramname{color:#803300}dl.reflist dt{border:2px solid #f60;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom:none}dl.reflist dd{border:2px solid #f60;border-bottom-right-radius:4px;border-bottom-left-radius:4px;border-top:none}table.doxtable{border-collapse:inherit;border-spacing:0;border:2px solid #f60;border-radius:4px}a,a:hover,a:visited,a:visited:hover,.contents a:visited,.el,a.el:visited,#glfwhome:hover,.tablist a:hover,span.lineno a:hover{color:#f60;text-decoration:none}div.directory{border-collapse:inherit;border-spacing:0;border:2px solid #f60;border-radius:4px}.memSeparator{height:2px;border:none;background:linear-gradient(to right, #f2f2f2 0, #d9d9d9 50%, #f2f2f2 100%)}dl.note,dl.pre,dl.post,dl.invariant{background:linear-gradient(to bottom, #ddfad1 0, #cbf7ba 100%);box-shadow:inset 0 0 32px #baf5a3;color:#112e05;border:2px solid #b4d9a6}dl.warning,dl.attention{background:linear-gradient(to bottom, #fae8d1 0, #f7ddba 100%);box-shadow:inset 0 0 32px #f5d1a3;color:#2e1c05;border:2px solid #d9c3a6}dl.deprecated,dl.bug{background:linear-gradient(to bottom, #fad1e3 0, #f7bad6 100%);box-shadow:inset 0 0 32px #f5a3c8;color:#2e0517;border:2px solid #d9a6bd}dl.todo,dl.test{background:linear-gradient(to bottom, #d1ecfa 0, #bae3f7 100%);box-shadow:inset 0 0 32px #a3daf5;color:#05202e;border:2px solid #a6c8d9}dl.note,dl.pre,dl.post,dl.invariant,dl.warning,dl.attention,dl.deprecated,dl.bug,dl.todo,dl.test{border-radius:4px;padding:1em;text-shadow:0 1px 1px #fff}div.fragment,pre.fragment{background:#333;border-radius:4px;border:none;padding:.5em 2em;overflow:auto;border-left:4px solid #ccc}.lineno a,.lineno a:visited,.line,pre.fragment{color:#f8f8f2}a.code,a.code:visited,span.preprocessor,span.comment{color:#a6e22c}span.keyword,span.keywordtype,span.keywordflow{color:#67d8ef}span.stringliteral{color:#e7db74}code{padding:.1em;border-radius:4px}

343
docs/extra.less Normal file
View File

@ -0,0 +1,343 @@
// NOTE: Please use this file to perform modifications on default style sheets.
//
// You need to install a few Ruby gems to generate extra.css from this file:
// gem install less therubyracer
//
// Run this command to regenerate extra.css after you're finished with changes:
// lessc --compress extra.less > extra.css
//
// Alternatively you can use online services to regenerate extra.css.
// Default text color for page contents
@default-text-color: hsl(0,0%,30%);
// Page header, footer, table rows, inline codes and definition lists
@header-footer-background-color: hsl(0,0%,95%);
// Page header, footer links and navigation bar background
@header-footer-link-color: hsl(0,0%,40%);
// Doxygen navigation bar links
@navbar-link-color: @header-footer-background-color;
// Page content background color
@content-background-color: hsl(0,0%,100%);
// Bold, italic, h1, h2, ... and table of contents
@heading-color: hsl(0,0%,10%);
// Function, enum and macro definition separator
@def-separator-color: @header-footer-background-color;
// Base color hue
@base-hue: 24;
// Default color used for links
@default-link-color: hsl(@base-hue,100%,50%);
// Doxygen navigation bar active tab
@tab-text-color: hsl(0,0%,100%);
@tab-background-color1: @default-link-color;
@tab-background-color2: lighten(spin(@tab-background-color1, 10), 10%);
// Table borders
@default-border-color: @default-link-color;
// Table header
@table-text-color: @tab-text-color;
@table-background-color1: @tab-background-color1;
@table-background-color2: @tab-background-color2;
// Table of contents, data structure index and prototypes
@toc-background-color1: hsl(0,0%,90%);
@toc-background-color2: lighten(@toc-background-color1, 5%);
// Function prototype parameters color
@prototype-param-color: darken(@default-link-color, 25%);
// Message box color: note, pre, post and invariant
@box-note-color: hsl(103,80%,85%);
// Message box color: warning and attention
@box-warning-color: hsl(34,80%,85%);
// Message box color: deprecated and bug
@box-bug-color: hsl(333,80%,85%);
// Message box color: todo and test
@box-todo-color: hsl(200,80%,85%);
// Message box helper function
.message-box(@base-color) {
background:linear-gradient(to bottom,lighten(@base-color, 5%) 0%,@base-color 100%);
box-shadow:inset 0 0 32px darken(@base-color, 5%);
color:darken(@base-color, 75%);
border:2px solid desaturate(darken(@base-color, 10%), 40%);
}
#navrow1,#navrow2,#navrow3,#navrow4,.tablist a,.tablist a:visited,.tablist a:hover,.tablist li,.tablist li.current a,.memdoc,dl.reflist dd,div.toc li,.ah,span.lineno,span.lineno a,span.lineno a:hover,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,.doxtable code {
background:none;
}
#titlearea,.footer,.contents,div.header,.memdoc,table.doxtable td,table.doxtable th {
border:none;
}
.tablist a,.tablist a:visited,.tablist a:hover,.tablist li,.tablist li.current a,.reflist dt a.el,.levels span,.directory .levels span {
text-shadow:none;
}
.memdoc,dl.reflist dd {
box-shadow:none;
}
div.headertitle,.note code,.pre code,.post code,.invariant code,.warning code,.attention code,.deprecated code,.bug code,.todo code,.test code,table.doxtable code {
padding:0;
}
#nav-path,.directory .levels {
display:none;
}
html,#titlearea,.footer,tr.even,.directory tr.even,.doxtable tr:nth-child(even),.mdescLeft,.mdescRight,.memItemLeft,.memItemRight,code {
background:@header-footer-background-color;
}
body {
color:@default-text-color;
}
h1,h2,h2.groupheader,h3,div.toc h3,h4,h5,h6,strong,em {
color:@heading-color;
border-bottom:none;
}
.glfwheader {
font-size:16px;
height:64px;
max-width:920px;
min-width:800px;
padding:0 32px;
margin:0 auto;
}
#glfwhome {
line-height:64px;
padding-right:48px;
color:@header-footer-link-color;
font-size:2.5em;
background:url("http://www.glfw.org/css/arrow.png") no-repeat right;
}
.glfwnavbar {
list-style-type:none;
margin:0 auto;
float:right;
}
#glfwhome,.glfwnavbar li {
float:left;
}
.glfwnavbar a,.glfwnavbar a:visited {
line-height:64px;
margin-left:2em;
display:block;
color:@header-footer-link-color;
}
#glfwhome,.glfwnavbar a,.glfwnavbar a:visited {
transition:.35s ease;
}
#titlearea,.footer {
color:@header-footer-link-color;
}
address.footer {
text-align:center;
padding:2em;
margin-top:3em;
}
#top {
background:@header-footer-link-color;
}
#navrow1,#navrow2,#navrow3,#navrow4 {
max-width:920px;
min-width:800px;
margin:0 auto;
font-size:13px;
}
.tablist {
height:36px;
display:block;
position:relative;
}
.tablist a,.tablist a:visited,.tablist a:hover,.tablist li,.tablist li.current a {
color:@navbar-link-color;
}
.tablist li.current a {
background:linear-gradient(to bottom,@tab-background-color2 0%,@tab-background-color1 100%);
box-shadow:inset 0 0 32px @tab-background-color1;
text-shadow:0 -1px 1px darken(@tab-background-color1, 15%);
color:@tab-text-color;
}
.contents {
min-height:590px;
}
div.contents,div.header {
max-width:920px;
margin:0 auto;
padding:0 32px;
background:@content-background-color none;
}
table.doxtable th,dl.reflist dt {
background:linear-gradient(to bottom,@table-background-color2 0%,@table-background-color1 100%);
box-shadow:inset 0 0 32px @table-background-color1;
text-shadow:0 -1px 1px darken(@table-background-color1, 15%);
color:@table-text-color;
}
dl.reflist dt a.el {
color:@default-link-color;
padding:.2em;
border-radius:4px;
background-color:lighten(@default-link-color, 40%);
}
div.toc {
float:none;
width:auto;
}
div.toc h3 {
font-size:1.17em;
}
div.toc ul {
padding-left:1.5em;
}
div.toc li {
font-size:1em;
padding-left:0;
list-style-type:disc;
}
div.toc,.memproto,div.qindex,div.ah {
background:linear-gradient(to bottom,@toc-background-color2 0%,@toc-background-color1 100%);
box-shadow:inset 0 0 32px @toc-background-color1;
text-shadow:0 1px 1px lighten(@toc-background-color2, 10%);
color:@heading-color;
border:2px solid @toc-background-color1;
border-radius:4px;
}
.memproto a {
color:@default-link-color;
}
.paramname {
color:@prototype-param-color;
}
dl.reflist dt {
border:2px solid @default-border-color;
border-top-left-radius:4px;
border-top-right-radius:4px;
border-bottom:none;
}
dl.reflist dd {
border:2px solid @default-border-color;
border-bottom-right-radius:4px;
border-bottom-left-radius:4px;
border-top:none;
}
table.doxtable {
border-collapse:inherit;
border-spacing:0;
border:2px solid @default-border-color;
border-radius:4px;
}
a,a:hover,a:visited,a:visited:hover,.contents a:visited,.el,a.el:visited,#glfwhome:hover,.tablist a:hover,span.lineno a:hover {
color:@default-link-color;
text-decoration:none;
}
div.directory {
border-collapse:inherit;
border-spacing:0;
border:2px solid @default-border-color;
border-radius:4px;
}
.memSeparator {
height:2px;
border:none;
background:linear-gradient(to right,@def-separator-color 0%,darken(@def-separator-color, 10%) 50%,@def-separator-color 100%);
}
dl.note,dl.pre,dl.post,dl.invariant {
.message-box(@box-note-color);
}
dl.warning,dl.attention {
.message-box(@box-warning-color);
}
dl.deprecated,dl.bug {
.message-box(@box-bug-color);
}
dl.todo,dl.test {
.message-box(@box-todo-color);
}
dl.note,dl.pre,dl.post,dl.invariant,dl.warning,dl.attention,dl.deprecated,dl.bug,dl.todo,dl.test {
border-radius:4px;
padding:1em;
text-shadow:0 1px 1px hsl(0,0%,100%);
}
div.fragment,pre.fragment {
background:hsl(0,0%,20%);
border-radius:4px;
border:none;
padding:.5em 2em;
overflow:auto;
border-left:4px solid hsl(0,0%,80%);
}
.lineno a,.lineno a:visited,.line,pre.fragment {
color:hsl(60,30%,96%);
}
a.code,a.code:visited,span.preprocessor,span.comment {
color:hsl(80,76%,53%);
}
span.keyword,span.keywordtype,span.keywordflow {
color:hsl(190,81%,67%);
}
span.stringliteral {
color:hsl(54,70%,68%);
}
code {
padding:.1em;
border-radius:4px;
}