white stroke and transparent fill

hey guys, wonder if there's anyone good with css here 😅 can anyone tell me why this outline looks like this? I don't quite understand how this text stroke thing works
.outline {
color: white;
text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}


@supports ((text-stroke: 2px black) or (-webkit-text-stroke: 2px black)) {
.outline {
color: transparent;
-webkit-text-stroke: 2px white;
text-stroke: 2px black;
text-shadow: none;
}
}
.outline {
color: white;
text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}


@supports ((text-stroke: 2px black) or (-webkit-text-stroke: 2px black)) {
.outline {
color: transparent;
-webkit-text-stroke: 2px white;
text-stroke: 2px black;
text-shadow: none;
}
}
No description
6 Replies
Matvey
Matvey2mo ago
that's how it works in the browser. Just add a color to the text that's the same as the background color
Aguilar
Aguilar5w ago
oooh hey that's awesome dude, thanks a lot
JulieCezar
JulieCezar5w ago
As far as I know, every line used in the letter will become 2 px. What you are seeing is because they used multiple lines instead of "bending" 1 line at the edges and combining it... I don't think you will be able to make it work like you expect
Aguilar
Aguilar4w ago
ohh this is interesting to know didn't quite research into these before
JulieCezar
JulieCezar4w ago
SVGs are basically lines... someone didn't expect you to do what you did with the font 😂 technically you could make it work by modifying the font yourself
Want results from more Discord servers?
Add your server
More Posts
(SEARCHING) Visual API Design SiteHi, I've seen a website that allows you to visualize your website processes (api), but I can't rememManaging High Bandwidth Consumption in Web Hosting and Cloud StorageWhen using a web hosting service like Netlify or Vercel, it's advised to store files in cloud storagplease help me on convincing my manager to choose react native over flutter:)Hi, so the current application is Windows app written with VisualBasic and it is ERP/MRP(material renext js production problem with authI’ve just deployed my app to vercel and when you enter it redirects instantly to auth which does notHow to interact with typescript language server programetically?I am trying to build an app for user searching queries through language server. Maybe later on that Help with dynamic image in Nuxt!does anyone know to import dynamic assets because ```<img :src="`/_nuxt/assets/images/${item.imageHow would you define 'Confidence' in testing? (Unit / Integration / E2E / Whatever)As titled. Most people claim that the purpose of testing is to maintain / improve 'confidence'. But.Has anyone here tried nuqs?Short for next-usequerystate: https://nuqs.47ng.com Seems like a pretty awesome/promising way to inHelp responding to coworkers on my technical decisions (NextJS)I feel like I'm at a point where I'm writing great quality software by blind-following best practiceGet loading state from server action without using `useFormStatus` or `useFormState`I like doing mutations with server actions because I don't have to write API routes and they remove