Entries by dsharpe

現場で役立つ実践Sass(3)変数を使いこなす

Adobe 変数はSassで最も使う機能の一つです。 変数を使うことでコードの再利用性が高くなるため、モジュール化やMixinには欠かせない機能です。 第三回目の今回は、Sassの変数まわりの仕様とTipsを紹介します。 ※今記事はRuby Sass 3.4.21で検証して書かれています。LibSassや、Sassのバージョンが違う場合は、コンパイル結果が異なる場合があります。 Sass変数とCSSネイティブ変数について Sassの変数は、コンパイルされたCSSでは、その変数の値に書き換えられます。なので当然そのままCSSとして使用することができます。 そして、現在策定中なのがCSSでも変数が使えるようになる CSS Variables (CSS Custom Properties) という仕様です。 ブラウザ対応状況は Can I Use を参考ください。(掲載時はFirefox, Chromeが対応) CSSネイティブの変数は、Sassの変数と仕様が若干違うので、Sassで使っていた変数を全てCSSネイティブの変数で置き換えることにはならなそうです。見比べてみましょう。 Sass変数について 変数名の先頭に $ をつけて定義します。そのまま属性の値として記述できますし、インターポレーション( #{} )を使えば、セレクタや文中にも配置することができます。 // コンパイル前(SCSS $base-font: “Roboto”; @import url(https://fonts.googleapis.com/css?family=#{$base-font}:400,700); body { font-family: $base-font, sans-serif; } // コンパイル後(CSS) @import url(https://fonts.googleapis.com/css?family=Roboto:400,700); body { font-family: “Roboto”, sans-serif; } コンパイル後のCSSでは、Sassの変数は定義した値と置き換わります。 CSSネイティブ変数について 変数名の先頭に — […]

The Studio Launches Creative Careers in Silicon Valley

Adobe The Bay Area in California is a celebrated hotbed of innovation and wealth.  However, it also harbors inequities amid rising poverty rates. Dedicated artists and organizations are working to increase access to educational opportunities and open doors to a better future.  The Studio at Silicon Valley Creates, AYV partner from the very beginning, is […]

Viva Las Vegas for SAP Ariba Live

Adobe Are you heading to SAP Ariba LIVE? So are we! What if every time you had to source goods, send an invoice, find a new supplier, or find a new customer, it wasn’t so complex? We’ve recently released a new version of the Adobe eSign services integration with Ariba Contract Management. Come see us at […]

Digital asset management for web pages with AEM Assets

Adobe Consider a scenario where you are creating a blogging website, and you want to use Adobe Experience Manager (AEM Assets – digital asset management platform) as your media library. You can use Asset Selector to integrate your website with Adobe Experience Manager (AEM Assets). Post integration, you can import images and their associated metadata from […]

Content governance: brand 2.0’s secret weapon?

Adobe The explosion of advertising avenues in the digital age Does your brand already have a Facebook page, a Twitter account, post photos on Instagram, videos on YouTube, publish a blog and circulate a newsletter? That’s great… but is it also on Snapchat, Vine, Periscope, Pinterest, WeChat, Line and Tribe? And does it moderate all […]

Get your hands on Creative Cloud Photography plan

Adobe Next week we’ll be heading to the NEC in Birmingham for the 2016 Photography Show. Whether you’re an amateur or professional photographer, we’d love to see you. This year we’re excited to say that our Adobe Theatre will be back and better than ever, with a huge programme of free sessions for all levels, […]

Everyone’s Optimizing: How More and More Industries Are Getting in the Game at Adobe Summit 2016

Marketing Cloud When you think about which industries were the early adopters of personalization and optimization, travel and ecommerce instantly spring to mind. For at least the last decade, marketers at our favorite shopping and travel-booking sites have been in a heavy “do” period, leveraging analytics and testing in an effort to make the most […]