4 ms·
Yes it's outline, just because it is probably the less used css rule available for the scope. Probably the alternative could be box-shadow. Having to modify bor
by 720kb 11y ago
Yes it's outline, just because it is probably the less used css rule available for the scope. Probably the alternative could be box-shadow. Having to modify borders will probably result in breaking third parties CSS etc.. more troubles guess.
The code is already open-source, feel free to open issues, fork and PR also if you want to add new features, the door is open wide!
- gravity13 11y agoYeah, you also have to account for box sizing by adding borders. What I've done for this in the past is use a css &:after pseudo-element and make it absolutely positioned, and set width and height at 100% and position it at left: 0 and top: 0. You can do things like give it a fill with opacity too, to highlight not with just outline but color overlay too. .outlined:after { content: ""; position: absolute; top: 0; width: 0; height: 100%; width: 100%; background-color: green; opacity: 0.3; } .outlined { position: relative; } // this part my be a poor assumption
- 720kb 11y agoHi, yes this is another alternative, probably the best one but it's hard actually to find the real best one because in the end everyone use different styles, different css frameworks, different use cases, in many cases it may break something in many others not, you know :) Anyway appreciated a lot your example and your tips, let's just wait for some feedback from people who use it and make decisions more clear. Thank you really :)