Skip to content

Commit

Permalink
Merge pull request #98 from mvujovic/filter-effects-codepen-responsive
Browse files Browse the repository at this point in the history
Make filter effects codepen responsive. Fixes issue #56.
  • Loading branch information
mvujovic committed Sep 12, 2014
2 parents 4aea304 + 7fe2312 commit 4a1df78
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 13 deletions.
6 changes: 4 additions & 2 deletions _posts/2014-06-12-filter-effects.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ Or you can use SVG filters to customize your own visual effects.

It's all encoded in the [Filter Effects Specification](http://www.w3.org/TR/filter-effects/){:target="_blank"}. But first, let's check out a quick example of CSS filters. Play with the slider below:

<p data-height="289" data-theme-id="0" data-slug-hash="KyEpe" data-default-tab="result" class='codepen'>See the pen <a href='http://codepen.io/adobe/pen/KyEpe/'>CSS Filters Example</a> by Adobe Web Platform (<a href='http://codepen.io/adobe'>@adobe</a>) on <a href='http://codepen.io'>CodePen</a>.</p>
<script async src="//codepen.io/assets/embed/ei.js"></script>
<div class="filter-effects-codepen">
<p data-height="320" data-theme-id="0" data-slug-hash="KyEpe" data-default-tab="result" class='codepen'>See the Pen <a href='http://codepen.io/adobe/pen/KyEpe/'>CSS Filters Example</a> by Adobe Web Platform (<a href='http://codepen.io/adobe'>@adobe</a>) on <a href='http://codepen.io'>CodePen</a>.</p>
<script async src="//codepen.io/assets/embed/ei.js"></script>
</div>

##When can I use it?

Expand Down
29 changes: 21 additions & 8 deletions css/main.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions css/main.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ p, code, pre, blockquote {
margin: 1rem 0;
}

figure, iframe {
figure {
margin: 2rem 0;
}

Expand All @@ -206,6 +206,10 @@ figcaption {
font-style: italic;
}

iframe {
margin: 1rem 0;
}

ol, ul {
margin: 1rem 3rem;
&.flush {
Expand Down Expand Up @@ -314,3 +318,13 @@ a {
.header.home {
@include halftone($offbgcolor, '/img/trianglify-background.svg')
}

/* Page Specific CSS */

.filter-effects-codepen iframe {
/* This breakpoint should correspond to the one defined in the CodePen, so
that when the CodePen changes its layout, the iframe height is updated. */
@media (max-width: 590px) {
height: 215px;
}
}

0 comments on commit 4a1df78

Please sign in to comment.