Wednesday, 21 May 2025

[netsurf-users] pseudo elements

Hello!

I am using libcss to parse CSS from WebVTT subtitle file.

example :


WEBVTT

STYLE
::cue {
  color: red;
  font-family: Arial, sans-serif;
  font-size: 16px;
  font-weight: bold;
  text-indent: 20px;
  background-color: rgba(0, 0, 0, 0.5);
  text-shadow: 1px 1px 2px black;
}
::cue(#\3) {
  color: blue;
  background-color: rgba(0.5, 0, 0, 0);
  font-size: 18px;
  padding: 5px;

}

I treat cue as a pseudo element. And for some reason, I have to strip the double colon from the id in order for libcss to process it. Below is my code that integrates with libcss


https://gitlab.freedesktop.org/boxerab/gstreamer/-/blob/webvtt/subprojects/gst-plugins-base/gst/subparse/gstcssparse.c?ref_type=heads

Any advice would be greatly appreciated!

Many Thanks,
Aaron Boxer


[netsurf-dev] Adding meson support to libcss

Hello!
I am using libcss in gstreamer project to parse css in webvtt web subtitle parser.
As gstreamer build system uses meson, I have added support for this in a branch

https://gitlab.collabora.com/libcss

Is there any interest in upstreaming support for meson ? 

Many Thanks,
Aaron Boxer