Skip to content

Apply namespace in one place then reflect throughout the project #23

@AaronKow

Description

@AaronKow

It would be good if we have a way to define the namespace variable in one place then it would be used throughout the css and HTML.

<template>
  <a
    :class="`${componentClass}`">
      <slot></slot>
  </a>
</template>

<script>
import {PROJECT_NAME} from './constants';

export default {
  name: "Link"
  props: {
    componentClass: {
      type: String,
      default: `${PROJECT_NAME}-link`
    }
  }
}
</script>

<style lang="scss">
.#{$project-name}-link {
  color: #111;
  text-decoration: none;
}
</style>

So, if we setup in this way that, we just need to change the variable in one place, then the namespace will be reflected throughout the project files.

Metadata

Metadata

Assignees

Labels

enhancementEnhancement to an existing feature

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions