View mathutils.jquery.js
(function($) {
$.mathUtils = {
sum: function(array) {
var total = 0;
$.each(array, function(index, value) {
total += $.mathUtils.parseCzechFloat(value);
});
return total;
},
View on-responsive-no-hover.js
if ('createTouch' in document)
{
try
{
var ignore = /:hover/;
for (var i=0; i<document.styleSheets.length; i++)
{
var sheet = document.styleSheets[i];
for (var j=sheet.cssRules.length-1; j>=0; j--)
View NetteCsvResponse.php
<?php
namespace Nette\Application\Responses;
use Nette;
/**
* CSV download response.
* Under New BSD license.
*
View modal.js
function feedbackModalFn(selector){
//var feedbackModal = $('.feedback-modal');
var feedbackModal = $(selector);
var winH;
var topPane;
var feedbackModalHeight;
// private scope
function init()
View colorbox-inline-href.html
<div style="display: none">
<div>
<div class="alert-valid tac" id="steps-completed">{&3KROKY_FORMULAR_ODESLAN}</div>
</div>
</div>
<script>
$(document).ready(function(){
View text-in-para.php
<?php
$text = <<<TEXT
Morbi nisl tortor, consectetur vitae laoreet eu, lobortis id ipsum. Integer scelerisque blandit pulvinar. Nam tempus mi eget nunc laoreet venenatis. Proin viverra, erat at accumsan tincidunt, ante mi cursus elit, non
congue mauris dolor ac elit. Maecenas mollis nisl a sem semper ornare. Integer nunc purus, dapibus nec dignissim sed, dictum eget leo. Etiam in mi ut erat pretium fringilla sed
TEXT;
$paragraphedText = "<p>" . implode( "</p>\n\n<p>", preg_split( '/\n(?:\s*\n)+/', $text ) ) . "</p>";
View bootstrap-autoclear.css
@media (min-width:1200px){
.auto-clear .col-lg-1:nth-child(12n+1){clear:left;}
.auto-clear .col-lg-2:nth-child(6n+1){clear:left;}
.auto-clear .col-lg-3:nth-child(4n+1){clear:left;}
.auto-clear .col-lg-4:nth-child(3n+1){clear:left;}
.auto-clear .col-lg-6:nth-child(odd){clear:left;}
}
@media (min-width:992px) and (max-width:1199px){
.auto-clear .col-md-1:nth-child(12n+1){clear:left;}
.auto-clear .col-md-2:nth-child(6n+1){clear:left;}
View SCSS.md

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

View style.css
.focus {
background-color: #ff00ff;
color: #fff;
cursor: pointer;
font-weight: bold;
}
.selected {
background-color: #ff00ff;
color: #fff;
View prunik-hranice.sql
select
*
from
rezervation_repeatedly
where
date_from <= '$week_end'
and date_to >= '$week_start'
order by
id asc