Zach Templeton Zach Templeton - 1 year ago 155
CSS Question

Using CSS Mixins in Polymer

I am working on a project that uses Polymer. One component that is unclear to me is how to use the style mixins. For example, I have something like this:

<script src="bower/webcomponentsjs/webcomponents-lite.min.js"></script>
<link rel="import" href="bower/polymer/polymer.html">
<link rel="import" href="bower/paper-styles/paper-styles.html">


<body unresolved class="fullbleed">
<template is="dom-bind" id="app">
<span class="paper-font-title">Welcome</span>
<span class="flex"></span>
<div class="secondary">
Today Is: <span>[[ date ]]</span>

Basically, I'm trying to use the paper-font-title and secondary typography styles. For some reason though, its like the styles aren't loaded. I looked in the console and I am not getting any 404s. For that reason, I assume the paper styles are being loaded. Why can't I use them?

Answer Source

To use style mixins add a <style is="custom-style"></style> to your body.

As content of the style tag add CSS rules like

some-selector {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download