Giter Club home page Giter Club logo

Comments (7)

KittyGiraudel avatar KittyGiraudel commented on May 28, 2024

Hello! ⭐

Do you mind giving an example of how you use an exposed utility once imported? :)

from sass-guidelines.

robsonsobral avatar robsonsobral commented on May 28, 2024

Not at all! Take a look!

@use 'config';

@forward 'config';
@forward 'functions' with (
  $my-base-url: config.$base-url,
  $my-breakpoints: config.$breakpoints,
  $my-font-weights: config.$font-weights,
  $my-gutter: config.$gutter,
  $my-palette: config.$palette,
);
@forward 'mixins';

I'm trying to start the discussion for the next version. Maybe I remember of another topics to address.

from sass-guidelines.

robsonsobral avatar robsonsobral commented on May 28, 2024

Ops! I'm sorry. I misunderstood your question!

I use them this way:

.foo {
  @include my.exposed-mixin('bar');
}

from sass-guidelines.

KittyGiraudel avatar KittyGiraudel commented on May 28, 2024

Ah I see. I’m just remembering how this thing works. Wondering whether or not we should suggest a default namespace. I don’t dislike my, but it might not always be suitable. For instance, team-based authoring might not be super comfortable with a namespace using first person, and our is just silly. 😅

Maybe utils or something? Or perhaps we should just not enforce it in any way?

from sass-guidelines.

robsonsobral avatar robsonsobral commented on May 28, 2024

I chose my because I was talking to a PERL developer at the time.

I just wanted to feel how would be to code using the namespace idea on my styles. On the bright side, we can avoid collisions between local and global members, like my.column-width and width. On the dark side, it's annoying to call your definitions file again and again. However, we can't avoid the last part.

from sass-guidelines.

robsonsobral avatar robsonsobral commented on May 28, 2024

I came to the conclusion that to use a namespace is absolutely necessary, to avoid making a mess with new CSS features, like image-set().

from sass-guidelines.

roydukkey avatar roydukkey commented on May 28, 2024

I think I would be more in favour of smaller, more focused modules that are namespaced with a singular noun that logically identifies what the modules provides. For example, @use 'query'; for utilities that handle media queries. Or, once developed enough @use 'breakpoint'; for utilities handling breakpoints.

from sass-guidelines.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.