Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

https://github.com/googlearchive/polystyles

Polymer style module web service
https://github.com/googlearchive/polystyles

Last synced: about 2 months ago
JSON representation

Polymer style module web service

Lists

README

        

## On-the-fly Polymer style modules

https://poly-style.appspot.com is a web service to wrap existing stylesheets with
Polymer's [style module system](https://www.polymer-project.org/1.0/docs/devguide/styling.html#style-modules).

## Usage

**Example** - load a stylesheet

```html



```

By default, the id "shared-styles" is used on the dom-module wrapper (e.g. ``). You can change this with the `id` URL param. See example below.

**Example** - use a custom id

```html



```

**Example** - element that uses a shared style

```html



/* Optional - define extra styles using the same <style> tag. */
:host {
display: block;
}

...


Polymer({is: 'my-element'});

```

**Example** - wrapping css text

produces:

```html



:host{display:block;}

```

**Note:** the `url` parameter trumps the `style` parameter if both are used together.

## Run tests

Install the [webtest framework](http://webtest.pythonpaste.org/en/latest/):

pip install WebTest

In the main project folder, run the rest runner:

python testrunner.py ~/google-cloud-sdk test/

The first argument is the location of your App Engine SDK. The second argument is
the path to the test folder.

## Report issues

File bugs and feature requests at https://github.com/PolymerLabs/polystyles.