Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

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

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                    <div class="container mx-auto max-w-screen-md min-h-screen px-4 md:px-8 py-8 border-l-4 border-teal">
    <ul>
      <li class="flex flex-col w-full "><div class="flex flex-row w-full"><div class="flex justify-center items-center"><i class="inline-block h-4"><svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="code-branch" class="svg-inline--fa fa-code-branch fa-w-12 h-full" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 384 512"><path fill="currentColor" d="M384 144c0-44.2-35.8-80-80-80s-80 35.8-80 80c0 36.4 24.3 67.1 57.5 76.8-.6 16.1-4.2 28.5-11 36.9-15.4 19.2-49.3 22.4-85.2 25.7-28.2 2.6-57.4 5.4-81.3 16.9v-144c32.5-10.2 56-40.5 56-76.3 0-44.2-35.8-80-80-80S0 35.8 0 80c0 35.8 23.5 66.1 56 76.3v199.3C23.5 365.9 0 396.2 0 432c0 44.2 35.8 80 80 80s80-35.8 80-80c0-34-21.2-63.1-51.2-74.6 3.1-5.2 7.8-9.8 14.9-13.4 16.2-8.2 40.4-10.4 66.1-12.8 42.2-3.9 90-8.4 118.2-43.4 14-17.4 21.1-39.8 21.6-67.9 31.6-10.8 54.4-40.7 54.4-75.9zM80 64c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16 7.2-16 16-16zm0 384c-8.8 0-16-7.2-16-16s7.2-16 16-16 16 7.2 16 16-7.2 16-16 16zm224-320c8.8 0 16 7.2 16 16s-7.2 16-16 16-16-7.2-16-16 7.2-16 16-16z"></path></svg></i><p class="text-sm mx-1">ぽ靴な缶</p></div><time datetime="2020-08-01" class="font-mono text-sm ml-auto self-end">2020-08-01</time></div><h3><a href="https://blog.pokutuna.com/entry/convert-heic-using-automator">Automator で .HEIC をオートに変換</a></h3><div class="flex flex-row w-full ml-4"><div class="flex-1 h-24"><div class="hidden md:block"><span class="font-mono text-xs mr-1 border border-teal-light px-1">Mac</span></div><div class="overflow-hidden break-all h-24 md:h-20 text-xs leading-relaxed"><p>AirDrop で iPhone から Mac へ撮った写真を移すのは一瞬でできるのに、Mac に移してから .HEIC フォーマットの画像を他サービスに貼り付けたりする時の面倒さたるや...
        今まで Preview.app で開いて保存し直したりしていたけど、領収書の写真を何枚も変換するの嫌すぎて Automator でやってみたら一瞬で出来た、なぜ今までやらなかったのか...
        コンテキストメニューから変換
        おもむろに Automator を起動して クイックアクション を作る。
        クイックアクション
        イメージのタイプを変更 を追加する、以下のように聞かれるが元データ要らないので追加しない。
        渡されたイメージファイルのイメージタイプを変更します。“Finder項目をコピー”アクションを追加して、オリジナルを変更しないでコピーを変更するようにしますか?


        変換後のタイプを JPEG にして保存して完成。JPG に変換 とかわかりやすい名前をつける。
        これだけ
        保存時の名前でコンテキストメニューに出てくるようになる。画像を右クリックで変換する。
        コンテキストメニューにのサービス以下から選べる
        保存したワークルフローファイルは ~/Library/Services 以下に保存されるようなので、編集したいときはそこから開く。




        フォルダアクションで変換
        いや右クリックもめんどいんだが、と思ったのでフォルダアクションで変換する。Automator のフォルダアクションは、特定のディレクトリにファイルが追加されたことをトリガとして処理を実行できる。
        ~/Downloads をターゲットに、シェルスクリプトを実行 アクションを追加して bash1 で引数として入力を貰う。実行するスクリプトは以下のような感じ。ファイル名の末尾が .HEIC なら sips コマンドで jpg へ変換する。sips コマンドは macOS 付属の画像処理コマンドなのでシュッと使えて便利。
        for f in "$@"; do
          if [ "${f##*.}" = 'HEIC' ]; then
            sips -s format jpeg $f --out "${f%.*}.jpg"
          fi
        done



        フォルダアクションでシェルスクリプトを実行
        スマホから AirDrop で受け取ったファイルはダウンロードディレクトリに保存される。

        作ったフォルダアクションは /Users/pokutuna/Library/Workflows/Applications/Folder\ Actions に保存されている。
        いやーなんでもっと早くやらなかったのか......
        例のシェルスクリプトは bash の文字列展開を利用して拡張子取り出したりしているため Shell Parameter Expansion (Bash Reference Manual)↩</p></div></div><div class="w-1/3 md:w-1/4 bg-teal mx-2 md:ml-4 border overflow-hidden"><img class="h-24 w-full object-cover" src="https://cdn-ak.f.st-hatena.com/images/fotolife/p/pokutuna/20200801/20200801170939.png"></div></div></li>
    </ul>
  </div>

              
            
!

CSS

              
                /*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}blockquote,dd,dl,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}button{background-color:transparent;background-image:none}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color}fieldset,ol,ul{margin:0;padding:0}ol,ul{list-style:none}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;line-height:1.5}*,:after,:before{box-sizing:border-box;border:0 solid #e2e8f0}hr{border-top-width:1px}img{border-style:solid}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{color:#a0aec0}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#a0aec0}input::-ms-input-placeholder,textarea::-ms-input-placeholder{color:#a0aec0}input::placeholder,textarea::placeholder{color:#a0aec0}[role=button],button{cursor:pointer}table{border-collapse:collapse}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}button,input,optgroup,select,textarea{padding:0;line-height:inherit;color:inherit}code,kbd,pre,samp{font-family:Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}.form-input{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#e2e8f0;border-width:1px;border-radius:.25rem;padding:.5rem .75rem;font-size:1rem;line-height:1.5}.form-input::-moz-placeholder{color:#a0aec0;opacity:1}.form-input:-ms-input-placeholder{color:#a0aec0;opacity:1}.form-input::-ms-input-placeholder{color:#a0aec0;opacity:1}.form-input::placeholder{color:#a0aec0;opacity:1}.form-input:focus{outline:none;box-shadow:0 0 0 3px rgba(66,153,225,.5);border-color:#63b3ed}.form-textarea{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#e2e8f0;border-width:1px;border-radius:.25rem;padding:.5rem .75rem;font-size:1rem;line-height:1.5}.form-textarea::-moz-placeholder{color:#a0aec0;opacity:1}.form-textarea:-ms-input-placeholder{color:#a0aec0;opacity:1}.form-textarea::-ms-input-placeholder{color:#a0aec0;opacity:1}.form-textarea::placeholder{color:#a0aec0;opacity:1}.form-textarea:focus{outline:none;box-shadow:0 0 0 3px rgba(66,153,225,.5);border-color:#63b3ed}.form-multiselect{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:#fff;border-color:#e2e8f0;border-width:1px;border-radius:.25rem;padding:.5rem .75rem;font-size:1rem;line-height:1.5}.form-multiselect:focus{outline:none;box-shadow:0 0 0 3px rgba(66,153,225,.5);border-color:#63b3ed}.form-select{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23a0aec0'%3e%3cpath d='M15.3 9.3a1 1 0 0 1 1.4 1.4l-4 4a1 1 0 0 1-1.4 0l-4-4a1 1 0 0 1 1.4-1.4l3.3 3.29 3.3-3.3z'/%3e%3c/svg%3e");-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;background-repeat:no-repeat;background-color:#fff;border-color:#e2e8f0;border-width:1px;border-radius:.25rem;padding:.5rem 2.5rem .5rem .75rem;font-size:1rem;line-height:1.5;background-position:right .5rem center;background-size:1.5em 1.5em}.form-select::-ms-expand{color:#a0aec0;border:none}@media not print{.form-select::-ms-expand{display:none}}@media print and (-ms-high-contrast:active),print and (-ms-high-contrast:none){.form-select{padding-right:.75rem}}.form-select:focus{outline:none;box-shadow:0 0 0 3px rgba(66,153,225,.5);border-color:#63b3ed}.form-checkbox:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M5.707 7.293a1 1 0 0 0-1.414 1.414l2 2a1 1 0 0 0 1.414 0l4-4a1 1 0 0 0-1.414-1.414L7 8.586 5.707 7.293z'/%3e%3c/svg%3e");border-color:transparent;background-color:teal;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}@media not print{.form-checkbox::-ms-check{border-width:1px;color:transparent;background:inherit;border-color:inherit;border-radius:inherit}}.form-checkbox{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-shrink:0;height:1em;width:1em;color:#4299e1;background-color:#fff;border-color:#e2e8f0;border-width:1px;border-radius:.25rem}.form-checkbox:focus{outline:none;box-shadow:0 0 0 3px rgba(66,153,225,.5);border-color:#63b3ed}.form-radio:checked{background-image:url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");border-color:transparent;background-color:currentColor;background-size:100% 100%;background-position:50%;background-repeat:no-repeat}@media not print{.form-radio::-ms-check{border-width:1px;color:transparent;background:inherit;border-color:inherit;border-radius:inherit}}.form-radio{-webkit-appearance:none;-moz-appearance:none;appearance:none;-webkit-print-color-adjust:exact;color-adjust:exact;display:inline-block;vertical-align:middle;background-origin:border-box;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;flex-shrink:0;border-radius:100%;height:1em;width:1em;color:#4299e1;background-color:#fff;border-color:#e2e8f0;border-width:1px}.form-radio:focus{outline:none;box-shadow:0 0 0 3px rgba(66,153,225,.5);border-color:#63b3ed}.bg-teal{--bg-opacity:1;background-color:teal;background-color:rgba(0,128,128,var(--bg-opacity))}.border-teal-light{--border-opacity:1;border-color:#80c0c0;border-color:rgba(128,192,192,var(--border-opacity))}.border-teal{--border-opacity:1;border-color:teal;border-color:rgba(0,128,128,var(--border-opacity))}.rounded-sm{border-radius:.125rem}.rounded-lg{border-radius:.5rem}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-l-4{border-left-width:4px}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.hidden{display:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.self-end{align-self:flex-end}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.content-center{align-content:center}.flex-1{flex:1 1 0%}.order-1{order:1}.order-2{order:2}.order-3{order:3}.font-mono{font-family:Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.font-light{font-weight:300}.font-medium{font-weight:500}.font-bold{font-weight:700}.h-1{height:.25rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-16{height:4rem}.h-24{height:6rem}.h-full{height:100%}.text-xs{font-size:.75rem}.text-sm{font-size:.875rem}.text-lg{font-size:1.125rem}.text-xl{font-size:1.25rem}.text-2xl{font-size:1.5rem}.text-4xl{font-size:2.25rem}.leading-relaxed{line-height:1.625}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mx-1{margin-left:.25rem;margin-right:.25rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.mx-2{margin-left:.5rem;margin-right:.5rem}.my-8{margin-top:2rem;margin-bottom:2rem}.mx-auto{margin-left:auto;margin-right:auto}.mr-1{margin-right:.25rem}.mb-1{margin-bottom:.25rem}.ml-1{margin-left:.25rem}.mr-2{margin-right:.5rem}.ml-2{margin-left:.5rem}.ml-4{margin-left:1rem}.mb-6{margin-bottom:1.5rem}.ml-auto{margin-left:auto}.max-w-screen-md{max-width:768px}.min-h-screen{min-height:100vh}.object-cover{-o-object-fit:cover;object-fit:cover}.overflow-hidden{overflow:hidden}.py-0{padding-top:0;padding-bottom:0}.px-1{padding-left:.25rem;padding-right:.25rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pl-2{padding-left:.5rem}.pb-8{padding-bottom:2rem}.text-left{text-align:left}.text-white{--text-opacity:1;color:#fff;color:rgba(255,255,255,var(--text-opacity))}.underline{text-decoration:underline}.no-underline{text-decoration:none}.break-all{word-break:break-all}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.w-4{width:1rem}.w-5{width:1.25rem}.w-16{width:4rem}.w-1\/3{width:33.333333%}.w-full{width:100%}@-webkit-keyframes spin{to{transform:rotate(1turn)}}@keyframes spin{to{transform:rotate(1turn)}}@-webkit-keyframes ping{75%,to{transform:scale(2);opacity:0}}@keyframes ping{75%,to{transform:scale(2);opacity:0}}@-webkit-keyframes pulse{50%{opacity:.5}}@keyframes pulse{50%{opacity:.5}}@-webkit-keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@keyframes bounce{0%,to{transform:translateY(-25%);-webkit-animation-timing-function:cubic-bezier(.8,0,1,1);animation-timing-function:cubic-bezier(.8,0,1,1)}50%{transform:none;-webkit-animation-timing-function:cubic-bezier(0,0,.2,1);animation-timing-function:cubic-bezier(0,0,.2,1)}}@media (min-width:640px){.sm\:container{width:100%}@media (min-width:640px){.sm\:container{max-width:640px}}@media (min-width:768px){.sm\:container{max-width:768px}}@media (min-width:1024px){.sm\:container{max-width:1024px}}@media (min-width:1280px){.sm\:container{max-width:1280px}}}@media (min-width:768px){.md\:container{width:100%}@media (min-width:640px){.md\:container{max-width:640px}}@media (min-width:768px){.md\:container{max-width:768px}}@media (min-width:1024px){.md\:container{max-width:1024px}}@media (min-width:1280px){.md\:container{max-width:1280px}}.md\:block{display:block}.md\:inline{display:inline}.md\:flex-row{flex-direction:row}.md\:order-4{order:4}.md\:h-20{height:5rem}.md\:text-5xl{font-size:3rem}.md\:ml-4{margin-left:1rem}.md\:px-8{padding-left:2rem;padding-right:2rem}.md\:w-auto{width:auto}.md\:w-1\/4{width:25%}.md\:w-3\/5{width:60%}}@media (min-width:1024px){.lg\:container{width:100%}@media (min-width:640px){.lg\:container{max-width:640px}}@media (min-width:768px){.lg\:container{max-width:768px}}@media (min-width:1024px){.lg\:container{max-width:1024px}}@media (min-width:1280px){.lg\:container{max-width:1280px}}}@media (min-width:1280px){.xl\:container{width:100%}@media (min-width:640px){.xl\:container{max-width:640px}}@media (min-width:768px){.xl\:container{max-width:768px}}@media (min-width:1024px){.xl\:container{max-width:1024px}}@media (min-width:1280px){.xl\:container{max-width:1280px}}}body{background-color:#f5f5f5}a{color:teal;color:rgba(0,128,128,var(--text-opacity));text-decoration:underline}a,a:visited{--text-opacity:1}a:visited{color:#004040;color:rgba(0,64,64,var(--text-opacity))}a:hover{--text-opacity:1;color:#80c0c0;color:rgba(128,192,192,var(--text-opacity))}.silent-link,.title-link{text-decoration:none}.silent-link,.silent-link:visited,.title-link,.title-link:visited{--text-opacity:1;color:#000;color:rgba(0,0,0,var(--text-opacity))}.silent-link:hover,.title-link:hover{text-decoration:underline;--text-opacity:1;color:#80c0c0;color:rgba(128,192,192,var(--text-opacity))}::-moz-selection{color:#f5f5f5;background:#80c0c0}::selection{color:#f5f5f5;background:#80c0c0}.placeholder{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-animation:placeholder-blink 1s ease-in-out infinite;animation:placeholder-blink 1s ease-in-out infinite}.placeholder a{color:transparent;background:linear-gradient(transparent 20%,teal 0,teal 80%,transparent 0);text-decoration:none}.placeholder i,.placeholder svg{color:grey}.placeholder p,.placeholder time{color:transparent;background:linear-gradient(transparent 20%,grey 0,grey 80%,transparent 0)}.placeholder p{display:inline}.placeholder span.content{color:transparent;background:linear-gradient(transparent 20%,grey 0,grey 80%,transparent 0)}.placeholder *{text-overflow:unset}@-webkit-keyframes placeholder-blink{0%{opacity:.8}50%{opacity:.6}to{opacity:.8}}@keyframes placeholder-blink{0%{opacity:.8}50%{opacity:.6}to{opacity:.8}}
              
            
!

JS

              
                
              
            
!
999px

Console