简体   繁体   中英

CSS - computed border color doesn't match actual border color

I have some ordinary buttons with a Tailwind class border-myCustomColor . In the computed styles in devtools, all sides are identical. But in the screenshot, you can see that the bottom/right sides are different to the top/left sides.

在此处输入图像描述

BUT

在此处输入图像描述

I'd love to a) fix it; but mostly b) understand how the computed styles could be wrong

If some other effect was being inherited from somewhere, shouldn't that be reflected in the computed styles?

It looks like you're using border-style: outset .

Try adding border-style:none , or border-style:solid in your desired border css property. To make it more compact you can also use border: {width} solid {calculated color}

See examples

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM