Skip to content

Feat: Multiple Inheritance #212

@robert-j-webb

Description

@robert-j-webb

Hi 👋!

I think this project is really interesting and I was wondering, why is it that I can only extend a block once? I'm in a situation where I want to import 2 blocks.

@block-reference buttons from "../../styles/blocks/buttons.block.css";
@block-reference loading from "../../styles/blocks/loading.block.css";

:scope {
  extends: buttons;
  extends: loading;
}
...

Generates Error:

{ Error: [css-blocks] BlockSyntaxError: A block can only be extended once. (tmp/broccoli_css_blocks_analyze-output_path-Co5Mjhle.tmp/src/ui/components/.../stylesheet.css:6:3)

I think the guide may be a bit confusing because I just want to use classes from 2 different files in one file and I really don't know any way of doing that.

Here's my package.json (the relevant parts [I think?]):

    "@css-blocks/ember-cli": "^0.20.0-beta.3",
    "@glimmer/application": "^0.9.1",

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions