startv

Pen Settings

CSS Base

Vendor Prefixing

Add External CSS

These stylesheets will be added in this order and before the code you write in the CSS editor. You can also add another Pen here, and it will pull the CSS from it. Try typing "font" or "ribbon" below.

Quick-add: + add another resource
via CSS Lint

Add External JavaScript

These scripts will run in this order and before the code in the JavaScript editor. You can also link to another Pen here, and it will run the JavaScript from it. Also try typing the name of any popular library.

Quick-add: + add another resource
via JS Hint

Code Indentation

     

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Want a Run Button?

If active, the preview will update automatically when you change code.

HTML

            
              <h1>Responsive blockquote using elementQuery</h1>
<p>Try changing the: viewport width, height of <code>blockquote</code> elements, base font-size, or zoom.</p>
<p>The following <a href="https://github.com/tysonmatanich/elementQuery">elementQuery</a> breakpoints are set:</p>
<ul>
    <li><code>min-height: 4.75em /* 76px */</code></li>
</ul>

<div class="container" style="font-size: 1em;">
    <p>Short blockquote in a container with <code>font-size: 1em</code>.</p>
    <blockquote>Height based element queries!</blockquote>
</div>
<div class="container" style="font-size: 1em;">
    <p>Blockquote in a container with <code>font-size: 1em</code>.</p>
    <blockquote>Element queries allow for new possibilities, such as change in appearance as an element's height changes.</blockquote>
</div>
<div class="container" style="font-size: 2em;">
    <p>Blockquote in a container with <code>font-size: 2em</code>.</p>
    <blockquote>Element queries allow for new possibilities, such as change in appearance as an element's height changes.</blockquote>
</div>
            
          
!

CSS

            
              body {
    font-family: sans-serif;
}

.container {
    margin-top: 1em;
    border: 2px solid #ccc;
    border-radius: 0.25em;
    padding: 1em;
}

blockquote {
    min-height: 1em;
    margin: 0;
    padding: 1em 2em;
    border-left: 0.5em solid #0094ff;
    border-right: 0.5em solid #0094ff;
    border-radius: 0.25em;
    background-color: #eee;
    line-height: 1.5em;
    color: #0082e0;
}

blockquote[min-height~="4.75em"] {
    padding: 1em 3em;
    border-left: 0;
    border-right: 0;
    border-top: 0.5em solid #74bd0a;
    border-bottom: 0.5em solid #74bd0a;
    font-style: italic;
    color: #619b0d;
}

h1 {
    font-size: 1.25em;
}

p {
    margin: 0 0 1em;;
}

code {
    padding: 0.25em 0.5em;
    color: #000;
    background-color: #f9f9f9;
}

a {
    color: #3a97c4;
}
            
          
!

JS

            
              
            
          
!
999px
Loading ..................

Console