-
-
Notifications
You must be signed in to change notification settings - Fork 16.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set colors using Jekyll variables (without conditionals) in main.css #299
Changes from 1 commit
203601d
8abdcd8
7d89d31
e2fbe19
73578b6
b226b9c
f715c39
afd4859
8007fb9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,10 +11,7 @@ body { | |
font-size: 18px; | ||
color: #404040; | ||
position: relative; | ||
background: #FFF; | ||
{% if site.page-col %} | ||
background: {{ site.page-col }}; | ||
{% endif %} | ||
background-color: {{ site.page-col }}; | ||
{% if site.page-img %} | ||
background-image: url({{ site.page-img }}); | ||
background-attachment: fixed; | ||
|
@@ -29,14 +26,11 @@ h1,h2,h3,h4,h5,h6 { | |
font-weight: 800; | ||
} | ||
a { | ||
color: #008AFF; | ||
color: {{ site.hover-col }}; | ||
} | ||
a:hover, | ||
a:focus { | ||
color: #0085a1; | ||
{% if site.hover-col %} | ||
color: {{ site.hover-col }}; | ||
{% endif %} | ||
} | ||
blockquote { | ||
color: #808080; | ||
|
@@ -74,18 +68,12 @@ hr.small { | |
::-moz-selection { | ||
color: white; | ||
text-shadow: none; | ||
background: #0085a1; | ||
{% if site.hover-col %} | ||
background: {{ site.hover-col }}; | ||
{% endif %} | ||
background-color: {{ site.hover-col }}; | ||
} | ||
::selection { | ||
color: white; | ||
text-shadow: none; | ||
background: #0085a1; | ||
{% if site.hover-col %} | ||
background: {{ site.hover-col }}; | ||
{% endif %} | ||
background-color: {{ site.hover-col }}; | ||
} | ||
img::selection { | ||
color: white; | ||
|
@@ -113,12 +101,9 @@ img { | |
/* --- Navbar --- */ | ||
|
||
.navbar-custom { | ||
background: #F5F5F5; | ||
background-color: {{ site.navbar-col }}; | ||
border-bottom: 1px solid #EAEAEA; | ||
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; | ||
{% if site.navbar-col %} | ||
background: {{ site.navbar-col }}; | ||
{% endif %} | ||
{% if site.navbar-img %} | ||
background-image: url({{ site.navbar-img }}); | ||
background-attachment: fixed; | ||
|
@@ -134,20 +119,14 @@ img { | |
.navbar-custom .navbar-brand, | ||
.navbar-custom .nav li a { | ||
font-weight: 800; | ||
color: #404040; | ||
{% if site.navbar-text-col %} | ||
color: {{ site.navbar-text-col }}; | ||
{% endif %} | ||
} | ||
|
||
.navbar-custom .navbar-brand:hover, | ||
.navbar-custom .navbar-brand:focus , | ||
.navbar-custom .nav li a:hover, | ||
.navbar-custom .nav li a:focus { | ||
color: #0085a1; | ||
{% if site.hover-col %} | ||
color: {{ site.hover-col }}; | ||
{% endif %} | ||
} | ||
|
||
.navbar-custom .navbar-brand-logo { | ||
|
@@ -241,17 +220,14 @@ img { | |
display: block; | ||
padding: 10px; | ||
padding-left: 30px; | ||
background: #f5f5f5; | ||
{% if site.navbar-children-col %} | ||
background: {{ site.navbar-children-col }}; | ||
{% endif %} | ||
background-color: {{ site.navbar-children-col }}; | ||
text-decoration: none !important; | ||
border-width: 0 1px 1px 1px; | ||
font-weight: normal; | ||
} | ||
@media only screen and (max-width: 767px) { | ||
.navbar-custom .nav .navlinks-container.show-children { | ||
background: #eee; | ||
background-color: #eee; | ||
} | ||
.navbar-custom .nav .navlinks-container.show-children .navlinks-children { | ||
display: block; | ||
|
@@ -262,12 +238,9 @@ img { | |
text-align: center; | ||
} | ||
.navbar-custom .nav .navlinks-container:hover { | ||
background: #eee; | ||
{% if site.navbar-col %} | ||
background: {{ site.navbar-col }}; | ||
background-color: {{ site.navbar-col }}; | ||
outline: 1px #eaeaea solid; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I actually don't think this outline is necessary, to me it looks to make things a bit less nice There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed afd4859 |
||
background: rgba(0, 0, 0, -0.1); | ||
{% endif %} | ||
background: rgba(0, 0, 0, 0.1); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you're right about this, I like that it makes any background of navbar work |
||
} | ||
.navbar-custom .nav .navlinks-container:hover .navlinks-children { | ||
display: block; | ||
|
@@ -286,13 +259,10 @@ img { | |
|
||
footer { | ||
padding: 30px 0; | ||
background: #F5F5F5; | ||
border-top: 1px #EAEAEA solid; | ||
margin-top: 50px; | ||
font-size: 14px; | ||
{% if site.footer-col %} | ||
background: {{ site.footer-col }}; | ||
{% endif %} | ||
background-color: {{ site.footer-col }}; | ||
{% if site.footer-img %} | ||
background-image: url({{ site.footer-img }}); | ||
background-attachment: fixed; | ||
|
@@ -354,10 +324,7 @@ footer .theme-by { | |
.post-preview a:focus, | ||
.post-preview a:hover { | ||
text-decoration: none; | ||
color: #0085a1; | ||
{% if site.hover-col %} | ||
color: {{ site.hover-col }}; | ||
{% endif %} | ||
} | ||
|
||
.post-preview .post-title { | ||
|
@@ -421,20 +388,14 @@ footer .theme-by { | |
} | ||
|
||
.blog-tags a { | ||
color: #008AFF; | ||
{% if site.hover-col %} | ||
color: {{ site.hover-col }}; | ||
{% endif %} | ||
text-decoration: none; | ||
padding: 0px 5px; | ||
} | ||
|
||
.blog-tags a:hover { | ||
border-radius: 2px; | ||
color: #008AFF; | ||
{% if site.hover-col %} | ||
color: {{ site.hover-col }}; | ||
{% endif %} | ||
background-color: #CCC; | ||
} | ||
|
||
|
@@ -567,7 +528,7 @@ footer .theme-by { | |
|
||
.header-section.has-img .no-img { | ||
margin-top: 0; | ||
background: #FCFCFC; | ||
background-color: #FCFCFC; | ||
margin: 0 0 40px; | ||
padding: 20px 0; | ||
box-shadow: 0 0 5px #AAA; | ||
|
@@ -628,7 +589,7 @@ footer .theme-by { | |
font-weight: 800; | ||
letter-spacing: 1px; | ||
padding: 10px 5px; | ||
background: #FFF; | ||
background-color: #FFF; | ||
border-radius: 0; | ||
color: #404040; | ||
} | ||
|
@@ -640,12 +601,8 @@ footer .theme-by { | |
.pager li a:hover, | ||
.pager li a:focus { | ||
color: #FFF; | ||
background: #0085a1; | ||
border: 1px solid #0085a1; | ||
{% if site.hover-col %} | ||
background: {{ site.hover-col }}; | ||
border-color: {{ site.hover-col }}; | ||
{% endif %} | ||
border: 1px solid {{ site.hover-col }}; | ||
background-color: {{ site.hover-col }}; | ||
} | ||
|
||
.pager { | ||
|
@@ -708,7 +665,7 @@ pre code { | |
white-space: pre; | ||
} | ||
pre.highlight, .highlight > pre, td.code pre { | ||
background: #FAFAFA; | ||
background-color: #FAFAFA; | ||
background-image: linear-gradient(#F9F9F9 50%, #FDFDFD 50%); | ||
background-repeat: repeat; | ||
background-size: 3em 3em; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a fallback in case rgba background is not supported by the browser, since rgba will normally override this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both
background-color: SkyBlue;
andbackground: rgba(0, 0, 0, 0.1);
applyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they're both technically applied, but I think it would be the exact same colour if you remove
background-color
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed 8007fb9