GithubHelp home page GithubHelp logo

Comments (2)

ling1726 avatar ling1726 commented on May 28, 2024

makeStyles that is imported from Fluent is actually a direct re-export of Griffel. This library is also owned by the Fluent UI team.

The reason that makeStyles does not support any runtime parameters/arguments is because of ahead of time compilation. This means that styles can be compiled at build time to avoid any computation cost at runtime.

The theming of Fluent UI is based on CSS variables which is completely independency of any third party. You can see an example of styling using Fluent UI

import { makeStyles, tokens } from '@fluentui/react-components';

const useStyles = makeStyles({
  root: { display: 'flex' },
  rootPrimary: { color: tokens.colorNeutralForeground3 },
});

tokens are completely independent and there is absolutely no need for it to be used. Can you please provide more details on what 3rd party libraries you would like to remove as a dependency?

from fluentui.

rhalaly avatar rhalaly commented on May 28, 2024

I wasn't aware of the tokens object. Thank you so much!

from fluentui.

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.