$value ) { $declarations .= sprintf( '%s:%s;', $property, $value ); } return ':root{' . $declarations . '}'; } /** * The look as CSS custom properties: property => value. * * @return array */ public static function tokens( ?Razorbooking_Look_Dto $look ): array { if ( ! $look ) { return array(); } return array( '--rb-accent' => $look->primary, '--rb-accent-ink' => $look->label, // The corner style's radii, from the API (ButtonShape::radii) — // the same corners the booking site and the widget draw. '--rb-control-radius' => $look->button_radius, '--rb-radius' => $look->frame_radius, ); } }