rogden / tailwind-config-viewer

A local UI tool for visualizing your Tailwind CSS configuration file.
1.99k stars 110 forks source link

Better display for screens #50

Open dhruvkb opened 2 years ago

dhruvkb commented 2 years ago

Shortcomings

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

Suggestions

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

ryanaltvater commented 2 years ago

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 commented 1 year ago

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