Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better display for screens #50

Open
dhruvkb opened this issue Dec 1, 2021 · 2 comments
Open

Better display for screens #50

dhruvkb opened this issue Dec 1, 2021 · 2 comments

Comments

@dhruvkb
Copy link

dhruvkb commented Dec 1, 2021

Shortcomings

The information shown by the screens module is not very helpful because:

  • it shows screens as widths so the only way to visualise all of them is if you have a display that's bigger than the biggest
  • the width is restricted by the horizontal viewport so on a smaller window, they all look alike (picture attached)
    Screenshot 2021-12-01 at 12 11 10 PM

Suggestions

I believe the module can be improved by the following changes:

  • making the screens break out of the viewport and scroll (not ideal)
  • hiding the sidebar and making the component full-width; inside
    • hiding screen sizes that are outside the viewport range (helpful to see the current breakpoint of the window)
  • showing the current screen width and breakpoint name
@ryanaltvater
Copy link

Also, I'd like to add that when you use a custom named screen the config viewer doesn't display the correct widths. It's only when you're using the default sm, md, lg, xl that the widths display correctly.

Example:

screens: {
    'xs-max' : {'max': '575.98px'},
    'sm'     : {'min': '576px'},
    'sm-max' : {'max': '767.98px'},
    'md'     : {'min': '768px'},
    'md-max' : {'max': '991.98px'},
    'lg'     : {'min': '992px'},
    'lg-max' : {'max': '1199.98px'},
    'xl'     : {'min': '1200px'},
    'xl-max' : {'max': '1399.98px'},
},

These all display as 100% width and unlabeled.

Screen Shot 2022-09-08 at 4 54 29 PM

@hacknug
Copy link
Contributor

hacknug commented Oct 10, 2022

Also, I'd like to add that when you use a custom named screen the config viewer doesn't display the correct widths. It's only when you're using the default sm, md, lg, xl that the widths display correctly.

Example:

screens: {
    'xs-max' : {'max': '575.98px'},
    'sm'     : {'min': '576px'},
    'sm-max' : {'max': '767.98px'},
    'md'     : {'min': '768px'},
    'md-max' : {'max': '991.98px'},
    'lg'     : {'min': '992px'},
    'lg-max' : {'max': '1199.98px'},
    'xl'     : {'min': '1200px'},
    'xl-max' : {'max': '1399.98px'},
},

Haven't checked the codebase but I suspect this is due to this project not support object syntax for screens.

EDIT: Confirmed this is the case https://github.com/rogden/tailwind-config-viewer/blob/master/src/components/Canvas/Sections/Screens.vue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants