wilfredwee / photon-australis

Bringing sexy curves back to Firefox Photon.
MIT License
462 stars 69 forks source link

Just the tiniest of issues #21

Closed fellowish closed 6 years ago

fellowish commented 6 years ago

When hovering over the new tab icon at the top, the silhouette of the new tab has one end that's shorter than the rest of the tab by literally one pixel

I mean, it's nothing monumentally awful, but it's triggering my OCD like when people put the toilet paper on the toilet paper dispenser backwards ya feel me

In any case the rest of it's absolutely stunning, good job

one pixel off

wilfredwee commented 6 years ago

Yeah I get what you mean. Unfortunately it is less than 1px. (??!!!) That's because of how the px are calculated from the svg.

I'll continue to try to make their height match as much as possible. It's triggering me a lot when I'm developing it too! Though in day-to-day use I tend to not notice it so far.

teijiIshida commented 6 years ago

I change only 1 value in these parts to fix it. In "background-position:" from 3px to 4px and one of the "height" portion from 31px to 30px.

Here's the code (find these portions in the css and replace them if you don't wanna change the value yourself):

/* New tab hover customizations */
.tabbrowser-tab:hover > .tab-stack > .tab-background:not([selected="true"]), .tabs-newtab-button:hover {
  background-position: 0px 2px, 30px 4px , right bottom !important;
  background-repeat: no-repeat !important;
  background-size: 30px 30px, calc(100% - (2 * 30px)) 30px, 30px !important;
}

and

.tabs-newtab-button:hover {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg' width='30px' height='31px' preserveAspectRatio='none'><defs><svg:clipPath id='tab-curve-clip-path-start' clipPathUnits='objectBoundingBox'><svg:path d='m 1,0.0625 0.05,0 0,0.938 -1,0 0,-0.028 C 0.32082458,0.95840561 0.4353096,0.81970962 0.48499998,0.5625 0.51819998,0.3905 0.535,0.0659 1,0.0625 z'/></svg:clipPath><svg:clipPath id='tab-curve-clip-path-end' clipPathUnits='objectBoundingBox'><svg:path d='m 0,0.0625 -0.05,0 0,0.938 1,0 0,-0.028 C 0.67917542,0.95840561 0.56569036,0.81970962 0.51599998,0.5625 0.48279998,0.3905 0.465,0.0659 0,0.0625 z'/></svg:clipPath><svg:clipPath id='tab-hover-clip-path' clipPathUnits='objectBoundingBox'><svg:path d='M 0,0.2 0,1 1,1, 1,0.2 z'/></svg:clipPath></defs><foreignObject width='30' height='31' clip-path='url(%23tab-curve-clip-path-start)'><div id='tab-background-fill' style='background-color:rgba(255,255,255,.1);background-repeat:no-repeat;height:100%;width:100%;' xmlns='http://www.w3.org/1999/xhtml'></div></foreignObject></svg>"),
    linear-gradient(rgba(255,255,255,.1), rgba(255,255,255,.1)),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' xmlns:svg='http://www.w3.org/2000/svg' width='30px' height='30px' preserveAspectRatio='none'><defs><svg:clipPath id='tab-curve-clip-path-start' clipPathUnits='objectBoundingBox'><svg:path d='m 1,0.0625 0.05,0 0,0.938 -1,0 0,-0.028 C 0.32082458,0.95840561 0.4353096,0.81970962 0.48499998,0.5625 0.51819998,0.3905 0.535,0.0659 1,0.0625 z'/></svg:clipPath><svg:clipPath id='tab-curve-clip-path-end' clipPathUnits='objectBoundingBox'><svg:path d='m 0,0.0625 -0.05,0 0,0.938 1,0 0,-0.028 C 0.67917542,0.95840561 0.56569036,0.81970962 0.51599998,0.5625 0.48279998,0.3905 0.465,0.0659 0,0.0625 z'/></svg:clipPath><svg:clipPath id='tab-hover-clip-path' clipPathUnits='objectBoundingBox'><svg:path d='M 0,0.2 0,1 1,1, 1,0.2 z'/></svg:clipPath></defs><foreignObject width='30' height='31' clip-path='url(%23tab-curve-clip-path-end)'><div id='tab-background-fill' style='background-color:rgba(255,255,255,.1);background-repeat:no-repeat;height:100%;width:100%;' xmlns='http://www.w3.org/1999/xhtml'></div></foreignObject></svg>")
    !important;
}
wilfredwee commented 6 years ago

Hey there, thanks so much for looking into this, @teijiIshida! Sorry for the late reply, work's been busy and I can only work on this during the weekends.

I've merged in the fix in #26, though I've tweaked the values a little differently from yours. I've tested this on 4k and 1080p resolution in Windows, and on OSX MBP 13inch Retina Display.

If the values are still not right, feel free to re-open this issue!

wilfredwee commented 6 years ago

Related release: https://github.com/wilfredwee/photon-australis/tree/v0.3.1