news.volyx.in

Multi-stroke text effect in CSS (yuanchuan.dev)

370 points by cheeaun · 116 days ago · 44 comments on HN

Article summary

The article discusses a technique for creating a multi-stroke text effect in CSS, which involves stacking elements and varying the text-stroke-width for each layer. The author achieved a closer result to the desired effect by experimenting with different values of text-stroke-width and colors. The technique has limitations, particularly in terms of performance, and is not well-suited for production usage. The article also explores the differences in rendering between browsers, with Firefox offering smoother rendering than Chrome and Safari.

Main themes

  • CSS text effects
  • Browser rendering differences
  • CSS vs SVG
  • Experimental web development
  • Text rendering techniques

What commenters say

  • The multi-stroke text effect can be achieved using CSS, but the rendering results may vary between browsers due to differences in their rendering engines.
  • Using SVG instead of CSS may be a better approach for creating complex graphics, but it can be less flexible and more complex for dynamic text.
  • The technique is not suitable for production usage due to performance issues, but it can be useful for experiments and generating images with CSS.
  • Firefox's rendering of the text effect is smoother than Chrome's, possibly due to its use of subpixel rendering and path smoothing.
  • The use of CSS for creating graphics is a form of creative experimentation and can lead to new and interesting effects, despite not being its intended purpose.
  • The differences in rendering between browsers are due to the complexity of stroke expansion and the varying approaches taken by each browser's rendering engine.
  • The technique can be useful for display text, such as headlines, and can be a cool effect, but it may not be practical for production usage.
  • The CSS-doodle library used in the article provides a unique syntax for creating CSS effects, but it may not be compatible with all browsers or use cases.