Skip to content

Split CSS files to make it possible to pick up individual effects [AMP Support] #143

@marcelovani

Description

@marcelovani

I really like this library and I want to use it with AMP see https://www.ampproject.org/

The problem
AMP validator limits the size of the CSS to 50kb.
The generated hover.css alone uses 115kb.

Proposed solution
The ability to generate single CSS files for each effect.
This would make it possible for example, to import only the effects I want, i.e.

@import 'hover.css/css/float-shadow';

This library uses this approach https://github.com/basscss/addons

import 'basscss-addons/modules/btn';
@import 'basscss-addons/modules/btn-primary';
@import 'basscss-addons/modules/btn-outline';
@import 'basscss-addons/modules/btn-sizes';

See https://github.com/ampproject/ampstart/blob/master/css/core.css

That makes it possible to use this library with AMP

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions