Giter VIP home page Giter VIP logo

Comments (4)

dragma avatar dragma commented on September 10, 2024

I'm working on it, this feature will have to force the module to get rid of the phone, tablet, desktop and giant media queries.

Major release incoming!

from styled-bootstrap-grid.

peterlazzarino avatar peterlazzarino commented on September 10, 2024

@dragma why remove the abstraction if the underlying numbers are made to be configurable? Is it tied to this issue in particular or part of a bigger overhaul?

from styled-bootstrap-grid.

dragma avatar dragma commented on September 10, 2024

Working on this issue made me realise that this module had a fundamental problem, and it is directly linked to those aliases sm => phone

Until now, "aliases" like desktop for lg weren't really aliases.
There was two entries with the same values.

Ex :

const breakpoints = {
  lg: 1234,
  desktop: 1234,
}

So, until then, when you update breakpoints yourselves with GridThemeProvider, you could do weird things like this :

const theme = {
  breakpoints: {
    lg: 1234,
    desktop: 4321,
  }
}

I have to find a way to "declare" aliases that are specifically bound to normalised breakpoints. :)
If I can do this, there will not be breaking changes in the usage anymore !

from styled-bootstrap-grid.

dragma avatar dragma commented on September 10, 2024

v1.2.0 published

max-width are now configurable through the <GridThemeProvider />

Ex:

const theme = {
  container: {
    maxWidth: {
      xl: 800, // or giant
    }
  },
};

ReactDOM.render(
  <GridThemeProvider gridTheme={theme}>
    <App />
  </GridThemeProvider>
  ,
  document.getElementById('root'), //eslint-disable-line
);

from styled-bootstrap-grid.

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.