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

Added test html file #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alex-e-leon
Copy link

Hey Elad, I really love your work!
I published a css reset with similar goals a while back (https://www.npmjs.com/package/reset-css-complete) but I dig your approach so much more!

Anyway, I thought I could share the simple html file I used for testing across browsers and thought that it might help you as well (for example, did you know that in chrome unsetting <input type="color"> is totally broken?)

Hope you find this useful
-Alex

@eladyad2
Copy link
Contributor

It isn't a bug. It removes the basic style of the "button".

If you add size like 'width: 100px; height: 100px;' you will see your custom styles.

@alex-e-leon
Copy link
Author

alex-e-leon commented Jul 22, 2021

I'm not sure whether you checked chrome or not but on my latest Version 91.0.4472.164 (Official Build) (x86_64) the color input is a 6 x 818px line when you unset the properties. If the below doesn't look like a UI bug I don't know what to say 😄

Screen Shot 2021-07-19 at 11 14 35 am

(^^ That line is a screenshot of the reset color input in chrome)
In comparison firefox resets the color input properly to a 1px x 1px square.

Obviously it's not a bug with this reset file (and lets be honest, who even uses color inputs), but it seems to be a bug in chrome and if you add your own styles on top it's easy to fix. I thought it was an interesting find though - and the reason I volunteered to contribute my test file!

@elektronik2k5
Copy link
Contributor

There are two separate issues here:

  1. There should be a simple HTML page with a preview of all browser tags, so one can preview it on the website without having to install/import the package.
  2. If some of the styling is broken, it should be a separate issue. @alex-e-leon can you please open a new issue with a description and a codepen/codesandbox demonstrating the problem?

@alex-e-leon
Copy link
Author

alex-e-leon commented Jul 23, 2021

@elektronik2k5 thanks for adding some clarity - I agree.

My intention with this PR was to address 1.

I went ahead and looked into 2. anyway to see if I could get to the bottom of it, and it turns out that the issue was caused by my testfile not including the proper Doctype header, so it looks like it's only an issue in chrome's quirks mode (I still find it to be a strange outcome though!)

I've updated my PR to include the html5 doctype and unset now behaves as expected in chrome, safari and firefox when I tested it.

Copy link
Contributor

@elektronik2k5 elektronik2k5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be cool to also publish the test page to the website, so one can preview it directly without having to install the package.

@elad2412
Copy link
Owner

@alex-e-leon I tested it in Chrome 91 and 92; it looks fine and not spreading.

Of course, to see it well, it needs to get sizing, but this is the idea of this CSS reset.

CodePen Demo Reset Color Input: https://codepen.io/elad2412/pen/83c4595573dd6ff280533e2b17fb7ff6?editors=1100

For the test, it will wait a little bit. I'm thinking of adding another CSS that will change the basic style with examples for form HTML elements on how to design them.

And after that, I will add your test.

Thanks,
Elad

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

Successfully merging this pull request may close these issues.

None yet

4 participants