Giter VIP home page Giter VIP logo

testing-primer-components's Introduction

Running project

1. Install dependencies

In the directory, run:

npm install
gatsby develop

2. Localhost

The site should be running on http://localhost:8000,
or if it's already in use, enter y when prompted to run on another port.

Issue

Version

The issue starts happening in @primer/components version 13.1.0, the issue is not present in version 13.0.0. The issue is still present in the latest version, 16.0.0.

Version 13.1.0 included an upgrade to Styled System v5. Maybe this has something to do with this changelog item:

The new theme.sizes scale replaces heights, minHeights, maxHeights, minWidths, and maxWidths; and is used for the width prop

Description

The maxWidth property from the styled-system LAYOUT props does not translate the received maxWidths theme key into the its value.

With version 13.0.0, using maxWidth with a theme size like medium will correctly translate into its pixel value, 768px.

In versions 13.1.0 and up, maxWidth no longer translates the theme's maxWidths keys into its pixel value. In Chrome DevTools, you can see the maxWidths key string 'medium' is used in the CSS instead of the key's value.

You can see the maxWidths values which are apart of primer's theme here: https://github.com/primer/components/blob/master/src/theme.js#L163

Using a string for a literal CSS value still works. E.g., maxWidth="200px".

Preview

1. maxWidth issue.

@primer/components version: 13.1.0 and up

maxWidth prop can't use theme values such as medium.

2. maxWidth working as expected.

@primer/components version: 13.0.0

maxWidth prop can use theme values such as medium.

testing-primer-components's People

Contributors

acknosyn avatar

Watchers

 avatar  avatar

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.