Skip to content
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

Dev #65

Merged
merged 7 commits into from
Jun 6, 2016
Merged

Dev #65

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 3 additions & 31 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
<div aria-hidden id='pattern'></div>
<section class='hero-container'>
<h1>Family.scss</h1>
<p><strong>Family.scss</strong> is a set of <strong><span id="amount"></span></strong> smart Sass mixins which will help you to manage the style of <code>:nth-child</code>’ified elements, in an easy and classy way.</p>
<p><strong>Family.scss</strong> is a set of <strong><span id="amount">26</span></strong> smart Sass mixins which will help you to manage the style of <code>:nth-child</code>’ified elements, in an easy and classy way.</p>
<div class='container-link'>
<a class='btn cta w-icon' download='download' href='https://raw.githubusercontent.com/LukyVj/family.scss/master/source/src/family.scss'><svg aria-label="Reset" role="img"><use xlink:href="#icon-download" xmlns:xlink="http://www.w3.org/1999/xlink"></use></svg> Download (4kb)</a>

<a class='btn cta w-icon' href='https://github.com/LukyVj/family.scss'><svg aria-label="Reset" role="img"><use xlink:href="#icon-github" xmlns:xlink="http://www.w3.org/1999/xlink"></use></svg> Github</a>
</div>
<script async='' id='_carbonads_js' src='//cdn.carbonads.com/carbon.js?zoneid=1673&amp;serve=C6AILKT&amp;placement=lukyvjgithubiofamilyscss' type='text/javascript'></script>
Expand All @@ -36,7 +37,6 @@ <h1>Family.scss</h1>
<style id='style-n-between'></style>
<style id='style-all-but'></style>
<style id='style-each'></style>
<style id='style-each-after'></style>
<style id='style-from-first-last'></style>
<style id='style-middle'></style>
<style id='style-all-but-first-last'></style>
Expand Down Expand Up @@ -289,34 +289,6 @@ <h3>each</h3>
<li>10</li>
</ul>
</div>
<div class='row mixin'>
<header>
<h3>each-after</h3>
</header>
<pre><code id='each-after'><span class="param"> @include</span> each-after(<span class="num" contenteditable id="each-after-a">3</span>,<span class="num" contenteditable id="each-after-b">6</span>)&#x000A;</code></pre>
<ul class='each-after'>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
<li>6</li>
<li>7</li>
<li>8</li>
<li>9</li>
<li>10</li>
<li>11</li>
<li>12</li>
<li>13</li>
<li>14</li>
<li>15</li>
<li>16</li>
<li>17</li>
<li>18</li>
<li>19</li>
<li>20</li>
</ul>
</div>
<div class='row mixin'>
<header>
<h3>from-first-last</h3>
Expand Down Expand Up @@ -634,7 +606,7 @@ <h2 class='title'>Playground</h2>
</a>
</div>
<p class='version'>
Version: <a href="https://github.com/LukyVj/family.scss/releases/">1.0.5</a>
Version: <a href="https://github.com/LukyVj/family.scss/releases/">1.0.6</a>
</p>
</footer>
<div class='about-section'>
Expand Down
6 changes: 0 additions & 6 deletions javascripts/all.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
'use strict';

window.onload = function(){
getNbSamples()
childManager()
childIndex();
modalizer();
Expand Down Expand Up @@ -48,11 +47,6 @@ function mixPattern(num) {
}
}

function getNbSamples(){
var n = document.getElementById('amount');
var ex = document.querySelectorAll('.doc ul').length;
n.textContent = ex;
}

// Generate li incrementer
function childManager(){
Expand Down
16 changes: 12 additions & 4 deletions javascripts/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -234,10 +234,18 @@ document.getElementById('each').addEventListener('keyup', function(){
function eachAfter(numa, numb) {
function injectStyle(numa, numb){
document.getElementById('style-each-after').innerHTML = `ul.each-after li { ${preStyle} }`;
document.getElementById('style-each-after').innerHTML += `.each-after li:nth-child(${numb}n) ~ li:nth-child(${numa}n){
${selectedStyle}
}
`
// if (numb < numa ) {
document.getElementById('style-each-after').innerHTML += `.each-after li:nth-child(${numb - numa}n) ~ :nth-child(${numa}n){
${selectedStyle}
}
`
// }
// else {
// document.getElementById('style-each-after').innerHTML += `.each-after li:nth-child(${numb}n) ~ :nth-child(${numa}n){
// ${selectedStyle}
// }
// `
// }
}

var newStyle = injectStyle(numa, numb);
Expand Down
2 changes: 1 addition & 1 deletion stylesheets/site.css

Large diffs are not rendered by default.