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

Make filter effects codepen responsive. Fixes issue #56. #98

Merged
Merged
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
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;
}
}