Skip to content

Commit

Permalink
Inline SCSS by default
Browse files Browse the repository at this point in the history
It's really just 3k
  • Loading branch information
killercup committed Jun 4, 2018
1 parent ea998f4 commit 8d3212c
Show file tree
Hide file tree
Showing 4 changed files with 152 additions and 140 deletions.
5 changes: 5 additions & 0 deletions _includes/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@charset "utf-8";

{% if site.colors.link %}$link-color: {{site.colors.link}};{% endif %}

@import 'index';
6 changes: 6 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@
<meta name="viewport" content="width=device-width, initial-scale=1"/>
{% include head_meta.html %}
<link rel="stylesheet" href="{{ "/assets/style.css" | relative_url }}"/><!-- hack.css, MIT license, (c) 2016 EGOIST -->
<style type="text/css">
{% capture include_to_scssify -%}
{% include style.scss %}
{% endcapture -%}
{{ include_to_scssify | scssify }}
</style>
</head>
<body>
<div class="hack container">
Expand Down
140 changes: 140 additions & 0 deletions _sass/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
/**
* hack.css v0.5.2
* @license (MIT) Copyright (c) 2016 EGOIST [email protected]
*/
@import 'hack/vars';
@import 'hack/mixins';
@import 'hack/reset';
@import 'hack/grid';
@import 'hack/markdown';
@import 'hack/layout';
@import 'hack/responsive';
// @import 'hack/components/alerts';
// @import 'hack/components/buttons';
// @import 'hack/components/card';
// @import 'hack/components/form';
// @import 'hack/components/holders';
// @import 'hack/components/loading';
// @import 'hack/components/media';
// @import 'hack/components/menu';
// @import 'hack/components/progress-bar';
@import 'hack/components/table';
@import 'highlight-github';
@import 'print';

footer.site-footer {
margin-top: 3rem;
border-top: 2px solid $grey-400;
padding-top: 2rem;
}

footer.article-footer {
margin: 4rem 0 2rem;
}

.post-content {
margin: 3rem 0;
}

.post-content {
-webkit-hyphens: auto;
}

code {
-webkit-hyphens: none;
}

.highlight {
code {
font-weight: normal;
}
}

.hack {
ul, ol {
ul, ol {
margin-top: 0;
margin-bottom: 0;
}
}
}

.hack blockquote {
:first-child {
margin-top: 0;
}

:last-child {
margin-bottom: 0;
}
}

.hack sup[id^="fnref"] {
font-size: 1rem;
vertical-align: baseline;

&:before {
content: "[^";
color: $grey-600;
}
&:after {
content: "]";
color: $grey-600;
}
}

.hack .footnotes {
color: $grey-600;

&:before {
content: "___";
display: block;
}
}

.hack dt {
font-weight: bold;
}

.hack dd {
margin-left: 0;
padding-left: $lh;
position: relative;

&:before {
content: ":";
position: absolute;
left: 0;
top: 0;
}
}

.highlight {
.k {
// font-weight: normal;
color: $grey-600;
}

.nd {
font-weight: normal;
}

.n {
color: $grey-900;
// font-weight: bold;
}
}

.language-rust {
.highlight {
// Hide some of rouges problems with highlighting life times
.err {
// Life time tick as well as following identifier, but also `?Sized`
&, & + .n {
color: #000080; // color of types
background-color: transparent;
font-weight: normal;
}
}
}
}
141 changes: 1 addition & 140 deletions assets/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,143 +4,4 @@

{% if site.colors.link %}$link-color: {{site.colors.link}};{% endif %}

/**
* hack.css v0.5.2
* @license (MIT) Copyright (c) 2016 EGOIST [email protected]
*/
@import 'hack/vars';
@import 'hack/mixins';
@import 'hack/reset';
@import 'hack/grid';
@import 'hack/markdown';
@import 'hack/layout';
@import 'hack/responsive';
// @import 'hack/components/alerts';
// @import 'hack/components/buttons';
// @import 'hack/components/card';
// @import 'hack/components/form';
// @import 'hack/components/holders';
// @import 'hack/components/loading';
// @import 'hack/components/media';
// @import 'hack/components/menu';
// @import 'hack/components/progress-bar';
@import 'hack/components/table';
@import 'highlight-github';
@import 'print';

footer.site-footer {
margin-top: 3rem;
border-top: 2px solid $grey-400;
padding-top: 2rem;
}

footer.article-footer {
margin: 4rem 0 2rem;
}

.post-content {
margin: 3rem 0;
}

.post-content {
-webkit-hyphens: auto;
}

code {
-webkit-hyphens: none;
}

.highlight {
code {
font-weight: normal;
}
}

.hack {
ul, ol {
ul, ol {
margin-top: 0;
margin-bottom: 0;
}
}
}

.hack blockquote {
:first-child {
margin-top: 0;
}

:last-child {
margin-bottom: 0;
}
}

.hack sup[id^="fnref"] {
font-size: 1rem;
vertical-align: baseline;

&:before {
content: "[^";
color: $grey-600;
}
&:after {
content: "]";
color: $grey-600;
}
}

.hack .footnotes {
color: $grey-600;

&:before {
content: "___";
display: block;
}
}

.hack dt {
font-weight: bold;
}

.hack dd {
margin-left: 0;
padding-left: $lh;
position: relative;

&:before {
content: ":";
position: absolute;
left: 0;
top: 0;
}
}

.highlight {
.k {
// font-weight: normal;
color: $grey-600;
}

.nd {
font-weight: normal;
}

.n {
color: $grey-900;
// font-weight: bold;
}
}

.language-rust {
.highlight {
// Hide some of rouges problems with highlighting life times
.err {
// Life time tick as well as following identifier, but also `?Sized`
&, & + .n {
color: #000080; // color of types
background-color: transparent;
font-weight: normal;
}
}
}
}
@import 'index';

0 comments on commit 8d3212c

Please sign in to comment.