0

I have a question about the use of less mixin in different style sheets.

I have 2 sheets of initial styles: reset.less and styleguide.less

I wonder how can I define a mixin in styleguide.less title.

And the reset just use it.

Example:

**styleguide.less**

    .title() {
      text-decoration: underline;
    }


**reset.less**

    .h1 {
      .title();
    }
Harry
  • 87,580
  • 25
  • 202
  • 214
Edmo Lima
  • 123
  • 10

1 Answers1

1

You would have to import the file that has that mixin into reset.less.

If you want to start using shared mixins, then you will most likely want to create a mixins file that you import where you need to.

I precede all imported files with an underscore like _mixins.less.

Then import this file into reset.less:

@import: path/to/_mixins.less;

robabby
  • 2,160
  • 6
  • 32
  • 47