1
0
mirror of https://github.com/Chalarangelo/mini.css.git synced 2025-04-20 04:11:53 +02:00

Preformatted element changes and demo page update

This commit is contained in:
Angelos Chalaris 2016-10-14 20:37:53 +03:00
parent 635f40af7a
commit 42817a3213
6 changed files with 36 additions and 12 deletions

View File

@ -62,4 +62,9 @@
- Added extra styling option for `small` elements in headers using a flag (`$make-header-smalltext-block`) and two variables (`$header-smalltext-b-font-size` and `$header-smalltext-b-top-margin`) to customize the styling of such elements.
- Minor changes to the way the index page looks for the version 2. Changed tagline and added version codename.
- Added github buttons under title in the index page.
- Added github buttons under title in the index page.
- Optimized the way `small` element styling is applied in headers when it is displayed as a block.
- Added fancy styling for `pre` elements with a flag (`$add-pre-element-sidebar`) and a corresponding variable (`$pre-element-sidebar-style`).
- Added margin for `pre` elements to be in line with paragraphs.
- Changed borders for `pre` elements: left-side borders' `border-radius` is now `0`.
- Changed index, centered title etc.

View File

@ -15,15 +15,16 @@
<link rel="stylesheet" href="../../flavors/v2/mini-default.css">
</head>
<body>
<h1>mini.css v2.0 &nbsp;<span style="color: #00994d; line-height: 1em;">{Fermion}</span><small>Minimal responsive style-agnostic front end framework</small></h1>
<!-- TODO: Move these to a column on the right side on larger displays and keep them where they are on smaller devices -->
<span style="text-align: center;">
<h1>mini.css v2.0 - <span style="color: #00994d; line-height: 1em;">Fermion</span><small>Minimal responsive style-agnostic front end framework</small></h1>
<p style="margin-top: -1em;">
<a class="github-button" href="https://github.com/chalarangelo/mini.css" data-icon="octicon-eye" data-count-href="/chalarangelo/mini.css/watchers" data-count-api="/repos/chalarangelo/mini.css#subscribers_count" data-count-aria-label="# watchers on GitHub" aria-label="Watch chalarangelo/mini.css on GitHub">Watch</a>
<a class="github-button" href="https://github.com/chalarangelo/mini.css" data-icon="octicon-star" data-count-href="/chalarangelo/mini.css/stargazers" data-count-api="/repos/chalarangelo/mini.css#stargazers_count" data-count-aria-label="# stargazers on GitHub" aria-label="Star chalarangelo/mini.css on GitHub">Star</a>
<a class="github-button" href="https://github.com/chalarangelo/mini.css/fork" data-icon="octicon-repo-forked" data-count-href="/chalarangelo/mini.css/network" data-count-api="/repos/chalarangelo/mini.css#forks_count" data-count-aria-label="# forks on GitHub" aria-label="Fork chalarangelo/mini.css on GitHub">Fork</a>
</p>
<p><strong>v2.0</strong> is currently in development. The following page and any related links are going to be incomplete, buggy and/or unstable. But, if you are interested in seeing what it will look like, have a peek!</p>
</p></span>
<hr>
<p><strong>v2.0</strong> is currently in development. The following page and any related links are going to be incomplete, buggy and/or unstable. But, if you are interested in seeing what it will look like, have a peek!</p>
<h1>Heading 1 <small>small text</small></h1>
<h2>Heading 2 <small>small text</small></h2>
<h3>Heading 3 <small>small text</small></h3>
@ -36,7 +37,6 @@
<p>Preformatted block of code:</p>
<pre>Line 1 {
Stuff here....
This is a really really really really loooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooong preformatted line. Let's see how it looks on your device!
}</pre>
<hr>
<p>This is some text with <small>small text</small>, superscript<sup>12</sup> and subscript<sub>4</sub>.</p>

View File

@ -71,9 +71,11 @@ code {
pre {
overflow: auto;
border-radius: 2px;
border-radius: 0 2px 2px 0;
background-color: #ddd;
padding: 12px; }
padding: 12px;
margin: 1px 10px;
border-left: 3px solid #0039e6; }
kbd {
border-radius: 2px;

View File

@ -1 +1 @@
*,html{font-family:"Helvetica Neue",Helvetica,sans-serif;font-size:1em;line-height:1.5;-webkit-text-size-adjust:100%}body{margin:0;color:#222;background-color:#f9f9f9}article,aside,figcaption,figure,footer,header,main,nav,section{display:block}h1,h2,h3,h4,h5,h6{line-height:1.2em;margin:.7em 8px;font-weight:500}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#444;display:block;margin-top:-.35em;font-size:45%}h1{font-size:2em}h2{font-size:1.5em}h3{font-size:1.15em}h4{font-size:1em}h5{font-size:.85em}h6{font-size:.75em}p{margin:1px 10px}b,strong{font-weight:700}hr{box-sizing:content-box;border:0;overflow:visible;line-height:1.2em;margin:.5em 4px;height:1px;background-image:linear-gradient(to right,#ccc,#666,#ccc);background-image:-webkit-linear-gradient(to right,#ccc,#666,#ccc)}code,kbd,pre,samp{font-family:monospace,monospace}code{border-radius:2px;background-color:#ddd;padding:2px 4px}pre{overflow:auto;border-radius:2px;background-color:#ddd;padding:12px}kbd{border-radius:2px;background-color:#222;color:#f9f9f9;padding:2px 4px}small,sub,sup{font-size:75%}sup{top:-.5em}sub{bottom:-.25em}sub,sup{line-height:0;position:relative;vertical-align:baseline}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}dfn{font-style:italic}mark{background-color:#ff0;color:#000}audio,video{display:inline-block}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}
*,html{font-family:"Helvetica Neue",Helvetica,sans-serif;font-size:1em;line-height:1.5;-webkit-text-size-adjust:100%}body{margin:0;color:#222;background-color:#f9f9f9}article,aside,figcaption,figure,footer,header,main,nav,section{display:block}h1,h2,h3,h4,h5,h6{line-height:1.2em;margin:.7em 8px;font-weight:500}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#444;display:block;margin-top:-.35em;font-size:45%}h1{font-size:2em}h2{font-size:1.5em}h3{font-size:1.15em}h4{font-size:1em}h5{font-size:.85em}h6{font-size:.75em}p{margin:1px 10px}b,strong{font-weight:700}hr{box-sizing:content-box;border:0;overflow:visible;line-height:1.2em;margin:.5em 4px;height:1px;background-image:linear-gradient(to right,#ccc,#666,#ccc);background-image:-webkit-linear-gradient(to right,#ccc,#666,#ccc)}code,kbd,pre,samp{font-family:monospace,monospace}code{border-radius:2px;background-color:#ddd;padding:2px 4px}pre{overflow:auto;border-radius:0 2px 2px 0;background-color:#ddd;padding:12px;margin:1px 10px;border-left:3px solid #0039e6}kbd{border-radius:2px;background-color:#222;color:#f9f9f9;padding:2px 4px}small,sub,sup{font-size:75%}sup{top:-.5em}sub{bottom:-.25em}sub,sup{line-height:0;position:relative;vertical-align:baseline}a{background-color:transparent;-webkit-text-decoration-skip:objects}a:active,a:hover{outline-width:0}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}dfn{font-style:italic}mark{background-color:#ff0;color:#000}audio,video{display:inline-block}svg:not(:root){overflow:hidden}button,input,optgroup,select,textarea{font-family:sans-serif;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=reset],[type=submit],button,html [type=button]{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-cancel-button,[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details,menu{display:block}summary{display:list-item}

View File

@ -52,14 +52,18 @@ $pre-element-padding: 12px; // Padding for <pre>
$pre-element-fore-color: $code-element-fore-color; // Text color for <pre>
$pre-element-back-color: $code-element-back-color; // Background color for <pre>
$pre-element-border-style: 0; // Border style for <pre>
$pre-element-border-radius: 2px; // Border radius for <pre>
$pre-element-border-radius: 0 2px 2px 0; // Border radius for <pre>
$pre-element-margin: 1px 10px; // Margin for <pre>
$add-pre-element-sidebar: true; // Should a fancy sidebar be added to the
// left side of <pre> (`true`/`false`)
$pre-element-sidebar-style: 3px solid #0039e6; // Style of the sidebar of <pre>
$kbd-element-padding: 2px 4px; // Padding for <kbd>
$kbd-element-fore-color: $back-color; // Text color for <kbd>
$kbd-element-back-color: $fore-color; // Background color for <kbd>
$kbd-element-border-style: 0; // Border style for <kbd>
$kbd-element-border-radius: 2px; // Border radius for <kbd>
$style-samp-element: false; // Should styles for <samp> be included?
// (`true`/`false`) [5]
// (`true`/`false`) [6]
//$samp-element-padding: 2px 4px; // Padding for <samp>
//$samp-element-fore-color: $fore-color; // Text color for <samp>
//$samp-element-back-color: #2678b3; // Background color for <samp>
@ -81,5 +85,7 @@ $sub-bottom: -0.25em; // <sub> bottom
// a gradient with the style specified in $horizontal-rule-fancy-gradient will be applied instead.
// [4] - If the value of $use-default-code-fonts is set to `false` the value of $code-font-family will be used. `true`
// will apply the proper fix to use monospace font without any problems on all browsers.
// [5] - If the value of $style-samp-element is set to `false`, no styling will be included in the final CSS file for
// [5] - if the value of $add-pre-element-sidebar is set to true, the style specified in $pre-element-sidebar-style will
// be applied as a left border for the <pre> elements.
// [6] - If the value of $style-samp-element is set to `false`, no styling will be included in the final CSS file for
// `samp` elements. Otherwise, the styling defined in the $samp-... variables will be applied.

View File

@ -38,8 +38,12 @@ h1, h2, h3, h4, h5, h6 {
$make-header-smalltext-block: false !default;
@if $make-header-smalltext-block {
display: block;
@if $header-smalltext-b-top-margin != 0 {
margin-top: $header-smalltext-b-top-margin;
}
@if $header-smalltext-b-font-size != $small-font-size {
font-size: $header-smalltext-b-font-size;
}
}
}
}
@ -138,6 +142,13 @@ pre {
@if $pre-element-padding != 0 {
padding: $pre-element-padding;
}
@if pre-element-margin != 0 {
margin: $pre-element-margin;
}
$add-pre-element-sidebar: false !default;
@if $add-pre-element-sidebar {
border-left: $pre-element-sidebar-style;
}
}
kbd {