/* これが理想だけど */ .box { width: calc( 100% - 300px ); } /* 現実はこう(`$var`が展開されず、SCSSがCSSとしてそのまま出力される・・) */ .box { width: calc( 100% - $var ); }
![SCSSの変数と、CSS3のcalc()を併用するには - Qiita](https://cdn-ak-scissors.b.st-hatena.com/image/square/7e7fdd2f8da16a0aae180cec6833af631f07b1d1/height=288;version=1;width=512/https%3A%2F%2Fqiita-user-contents.imgix.net%2Fhttps%253A%252F%252Fcdn.qiita.com%252Fassets%252Fpublic%252Farticle-ogp-background-9f5428127621718a910c8b63951390ad.png%3Fixlib%3Drb-4.0.0%26w%3D1200%26mark64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTkxNiZoPTMzNiZ0eHQ9U0NTUyVFMyU4MSVBRSVFNSVBNCU4OSVFNiU5NSVCMCVFMyU4MSVBOCVFMyU4MCU4MUNTUzMlRTMlODElQUVjYWxjJTI4JTI5JUUzJTgyJTkyJUU0JUJEJUI1JUU3JTk0JUE4JUUzJTgxJTk5JUUzJTgyJThCJUUzJTgxJUFCJUUzJTgxJUFGJnR4dC1jb2xvcj0lMjMyMTIxMjEmdHh0LWZvbnQ9SGlyYWdpbm8lMjBTYW5zJTIwVzYmdHh0LXNpemU9NTYmdHh0LWNsaXA9ZWxsaXBzaXMmdHh0LWFsaWduPWxlZnQlMkN0b3Amcz1lMDI1NzI0ZDNiYTFhNDk3ZDYxYzQ0ZjRmMjJmNjk2OQ%26mark-x%3D142%26mark-y%3D112%26blend64%3DaHR0cHM6Ly9xaWl0YS11c2VyLWNvbnRlbnRzLmltZ2l4Lm5ldC9-dGV4dD9peGxpYj1yYi00LjAuMCZ3PTYxNiZ0eHQ9JTQwbXRtdGt6bSZ0eHQtY29sb3I9JTIzMjEyMTIxJnR4dC1mb250PUhpcmFnaW5vJTIwU2FucyUyMFc2JnR4dC1zaXplPTM2JnR4dC1hbGlnbj1sZWZ0JTJDdG9wJnM9YWEyMzk1Zjk1YWJlOWZhNTMzNmM2N2E5MTBhZjA3NDc%26blend-x%3D142%26blend-y%3D491%26blend-mode%3Dnormal%26s%3D34e1c484e9c8e67e715618acc99cdae9)
Before we even get started talking about Sass and the code for this project, let me remind you this is no more than a quick experiment which by no means should be used in a live context. So what follows is only a proof of concept of what we could do with a couple of Sass variables and the calc() function from CSS. There are probably still quite a couple of flaws and edge cases that are not handled
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く