Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template "css-module-scope" attribute #15

Open
Lutymane opened this issue Sep 30, 2024 · 0 comments
Open

Template "css-module-scope" attribute #15

Lutymane opened this issue Sep 30, 2024 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@Lutymane
Copy link
Member

Allow specifying CSS module component scope in <template> attribute.

Example

Before:

<template lang="pug">
.CTable__table
  .CTable__row
    .CTable__column
    .CTable__column
      .item
</template>

After:

<template lang="pug" css-module-scope="CTable">
.table
  .row
    .column
    .column
      .self__item
</template>

Allow using self__ special scope to refer to own component classes.

For nested paths, scope works the same: css-module-scope="VHome_Header".

Motivation:

Some components can consist of (mostly) shared classes only, so this feature will enhance code readability and DX drastically.

@Lutymane Lutymane added the enhancement New feature or request label Sep 30, 2024
@Lutymane Lutymane added this to the 3.next milestone Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant