Refined-github: Draft PR icon looks weird

Created on 4 Feb 2020  ·  13Comments  ·  Source: sindresorhus/refined-github

The Draft PR icon (changed in #2742) looks really strange and doesn't resemble anything.

image

I'm using Brave Version 1.2.43 Chromium: 79.0.3945.130 (Official Build) (64-bit) on Ubuntu 18.04 LTS

change request good first issue help wanted under discussion

Most helpful comment

What about this CSS?

.js-issue-row [aria-label='Open draft pull request'] svg {
  stroke: #6a737d; /* GitHub's default draft PR color */
  stroke-width: 2px;
  color: #fff !important;
  paint-order: stroke;
  overflow: visible !important;
}

grafik

All 13 comments

I think you should report that to Brave, it's a plain filter: drop-shadow()

If you want a quick fix to undo this change, use this CSS:

:root .js-issue-row [aria-label="Open draft pull request"] svg {
    color: #6a737d !important;
    filter: none !important;
}

It looks strange in Firefox, too:
image

I'm using Firefox 72.0.2 (64-Bit) on Ubuntu 18.04 LTS

Would it not be better (and more supported) to use box-shadow?

box-shadow only works on a square, not on the "visible pixels" like filter

Reopening to discuss alternatives and ask for help to create this SVG:

[A solid] outline would be best, but there's no way to do that in CSS. I'd have to recreate the icon with the outline and embed the whole new SVG. Anyone wants to take a crack at creating the style in Illustrator/Sketch/etc?

Perhaps I should just apply this style as @tooomm also mentioned (but it'd become a JS feature): https://github.com/sindresorhus/refined-github/issues/2450#issuecomment-560247181

Makes more sense to do a solid outline directly in the SVG :+1:

What about this CSS?

.js-issue-row [aria-label='Open draft pull request'] svg {
  stroke: #6a737d; /* GitHub's default draft PR color */
  stroke-width: 2px;
  color: #fff !important;
  paint-order: stroke;
  overflow: visible !important;
}

grafik

That's really interesting. If lighter, but there's a small artifact near the arrow that kinds ruins it.

Actually it's not an artifact, it's just the stroke of the arrow's head touching the arrow's body, but it looks ugly 😰

We can also make the stroke thinner and use an even darker color instead:

.js-issue-row [aria-label="Open draft pull request"] svg {
  stroke: #24292e; /* ← $gray-900 from https://primer.style/css/utilities/colors */
  stroke-width: 1.2px; /* ← */
  color: #fff !important;
  paint-order: stroke;
  overflow: visible !important;
}

Screenshot_2020-02-13_15-09-52

^ Just tried this myself and it does look a lot better for me.

The only thing I would do is change the colour to be a lighter grey as it looks almost black which to me doesn't signify a draft PR.

Please send a PR with that CSS. I just used that style in for a different feature and it looks great!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

shivapoudel picture shivapoudel  ·  3Comments

supremebeing7 picture supremebeing7  ·  3Comments

sindresorhus picture sindresorhus  ·  3Comments

pawelad picture pawelad  ·  3Comments

Arcanemagus picture Arcanemagus  ·  3Comments