GTK, Adwaita, and Vendor Styles

During this GUADEC, we discussed the current state of things, and where and how we want to move towards. Since touching the platform stylesheet is potentially risky, we will play safe and be very conscious and careful when changing anything.

Goal

The first goal, for now, is to introduce a color palette.

Justification

Color palettes are already part of platforms, but there is no structured way in GNOME to use them. Right now, one needs to hardcode their values in the CSS directly.

elementary OS has an interesting approach to solve this: their palette colors are exposed as CSS variables. We feel this is a good way to go forward.

In addition to that, the work required to introduce a color palette in the platform’s stylesheet will give us a better idea of how to proceed with different goals.

Steps

To achieve it, three steps were proposed.

Step 1: Document Adwaita

Adwaita already has a set of publicly defined variables. These are set in the _colors-public.scss file. These variables should be properly documented.

Actions

  1. Document the public variables of Adwaita
  2. Make sure these variables are used consistently within Adwaita
  3. Make CSS codes of GNOME Core Apps use these variables as appropriate
  4. Coordinate communication with third-parties

Step 2: Export More Variables

From the list of private Adwaita colors, some of them may need to be exported publicly.

Actions

  1. Review GNOME Core Apps and identify which colors may need to be exported
  2. Export and document these colors
  3. Coordinate communication with third-parties

Step 3: Color Palette

With the applications making proper use of CSS variables, it is now possible to introduce a color in the platform stylesheet.

Actions

  1. Introduce CSS variables with the platform’s palette colors
  2. Coordinate communication with third-parties
7 Likes