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

[supersedes #58] Add arrow for <select> #94

Merged
merged 11 commits into from
Sep 1, 2019

Conversation

jonaskuske
Copy link
Collaborator

@jonaskuske jonaskuske commented Jun 6, 2019

I took the liberty to update #58 so it aligns with our CSS-variable powered codebase:

  1. Rebased IL4Miy/water.css on current master, so it can be merged again
    (and so that @IL4Miy still appears as a contributor in our git history :) )
  2. Added postcss-inline-svg to inline the SVGs instead of loading them through url()
  3. Restructured the build to use a single file select-arrow.svg for both dark & light versions, as you can specify the desired color while inlining with the svg-load() function of postcss-inline-svg
  4. Updated the cssnano config so the SVG is more heavily minified¹
  5. Tested the result in Chrome, Firefox, Edge (EdgeHTML) and Internet Explorer. Not in Safari unfortunately, as I don't have Apple hardware.

Preview URL: https://deploy-preview-94--watercss.netlify.com/

Note: I didn't yarn build yet so you can better see the changes. Why don't we just only build prior to publishing a new release?
 

fix #57
close #58


¹ I reduced the floatPrecision to 0 so all numbers used in the SVG are rounded to an integer. This saves another ~50% – which we really need, as we now ship both the dark and the light arrow in our non-standalone builds. The resulting SVG looks a bit funny when opened in an image viewer at large size, but perfectly fine in the browser, even at maximum zoom level.

alexanderbluhm and others added 7 commits June 6, 2019 22:52
select tag is styled in a new way
added preview for select tag
Added two svg files for the arrow.
Removed old inline svg and url-encode.
Created SASS variables for the svg path.
Default browser arrow was displayed in IE11.
Copy link
Collaborator

@kylejrp kylejrp left a comment

Choose a reason for hiding this comment

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

Great work and neat trick with floatPrecision: 0. I'm glad that you found a way to inline the SVGs. (Thanks for doing that for me!)

Note: I didn't yarn build yet so you can better see the changes. Why don't we just only build prior to publishing a new release?

Yup, I agree. I think you mentioned before that we can get rid of the builds once we switch to npm distributed releases anyways, right?

Copy link
Collaborator

@kylejrp kylejrp left a comment

Choose a reason for hiding this comment

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

Actually, there's some (hopefully easy) merge conflicts that I can't see through Github's merge conflict UI. Do you mind resolving these?

@jonaskuske
Copy link
Collaborator Author

I think you mentioned before that we can get rid of the builds once we switch to npm distributed releases anyways, right?

Yep, exactly :)
I also described the steps needed for this here on the npm PR. (#64)

Actually, there's some (hopefully easy) merge conflicts that I can't see through Github's merge conflict UI. Do you mind resolving these?

Done. Both the recent text-semantics PR and this one added some variables to the end of the respective files, was indeed an easy fix 👍🏻

@alexanderbluhm
Copy link
Contributor

@jonaskuske Great work! Thank's

@kognise kognise self-requested a review August 26, 2019 16:14
@kognise
Copy link
Owner

kognise commented Sep 1, 2019

After merging in the changes from master the box isn't rendering properly - lemme take a look at this
image

@kognise kognise requested a review from kylejrp September 1, 2019 17:14
@kognise
Copy link
Owner

kognise commented Sep 1, 2019

Fixed! @kylejrp could you please take a look at this?

Copy link
Collaborator

@kylejrp kylejrp left a comment

Choose a reason for hiding this comment

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

Looks great, awesome work guys!

@kylejrp kylejrp merged commit 3aedaf2 into kognise:master Sep 1, 2019
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.

Style of <select>
4 participants