mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-27 06:00:22 +00:00
css: Add more currentcolor style tests
These tests check various situations with inheritance and currentColor. In particular the caret-color test was not working correctly before we handled used values explicitly.
This commit is contained in:
parent
f57010180c
commit
e4325e5b2b
11
testsuite/css/style/currentcolor2.css
Normal file
11
testsuite/css/style/currentcolor2.css
Normal file
@ -0,0 +1,11 @@
|
||||
.a {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.b {
|
||||
color: color-mix(in srgb, blue, currentcolor);
|
||||
}
|
||||
|
||||
.c {
|
||||
background-color: currentcolor;
|
||||
}
|
9
testsuite/css/style/currentcolor2.nodes
Normal file
9
testsuite/css/style/currentcolor2.nodes
Normal file
@ -0,0 +1,9 @@
|
||||
window.a:dir(ltr)
|
||||
color: rgb(255,0,0); /* currentcolor2.css:2:3-14 */
|
||||
|
||||
box.b:dir(ltr)
|
||||
color: color(srgb 0.5 0 0.5); /* currentcolor2.css:6:3-49 */
|
||||
|
||||
label.c:dir(ltr)
|
||||
color: color(srgb 0.25 0 0.75);
|
||||
background-color: color(srgb 0.25 0 0.75); /* currentcolor2.css:10:3-34 */
|
21
testsuite/css/style/currentcolor2.ui
Normal file
21
testsuite/css/style/currentcolor2.ui
Normal file
@ -0,0 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="decorated">0</property>
|
||||
<property name="css-classes">a</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="css-classes">b</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Hello World!</property>
|
||||
<property name="css-classes">c</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
8
testsuite/css/style/currentcolor3.css
Normal file
8
testsuite/css/style/currentcolor3.css
Normal file
@ -0,0 +1,8 @@
|
||||
entry {
|
||||
caret-color: color-mix(in srgb, currentcolor, yellow 40%);
|
||||
color: blue;
|
||||
}
|
||||
|
||||
text {
|
||||
color: red;
|
||||
}
|
13
testsuite/css/style/currentcolor3.nodes
Normal file
13
testsuite/css/style/currentcolor3.nodes
Normal file
@ -0,0 +1,13 @@
|
||||
window.background:dir(ltr)
|
||||
entry:dir(ltr)
|
||||
color: rgb(0,0,255); /* currentcolor3.css:3:3-15 */
|
||||
caret-color: color(srgb 0.4 0.4 0.6); /* currentcolor3.css:2:3-61 */
|
||||
|
||||
text:dir(ltr)
|
||||
color: rgb(255,0,0); /* currentcolor3.css:7:3-14 */
|
||||
caret-color: color(srgb 1 0.4 0);
|
||||
|
||||
undershoot.left:dir(ltr)
|
||||
caret-color: color(srgb 1 0.4 0);
|
||||
undershoot.right:dir(ltr)
|
||||
caret-color: color(srgb 1 0.4 0);
|
13
testsuite/css/style/currentcolor3.ui
Normal file
13
testsuite/css/style/currentcolor3.ui
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<object class="GtkWindow" id="window1">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="decorated">0</property>
|
||||
<child>
|
||||
<object class="GtkEntry">
|
||||
<property name="visible">True</property>
|
||||
<property name="text" translatable="yes">Hello World!</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</interface>
|
Loading…
Reference in New Issue
Block a user