summaryrefslogtreecommitdiffstats
path: root/devtools/server/tests/chrome/inactive-property-helper/scroll-padding.mjs
blob: acb2899be2387cb002ce7256aa82418d3488effa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

// InactivePropertyHelper `scroll-padding-*` test cases.

export default [
  {
    info: "scroll-padding is active on element with auto-overflow",
    property: "scroll-padding",
    tagName: "div",
    rules: ["div { overflow: auto; scroll-padding: 10px; }"],
    isActive: true,
  },
  {
    info: "scroll-padding is active on element with scrollable overflow",
    property: "scroll-padding",
    tagName: "div",
    rules: ["div { overflow: scroll; scroll-padding: 10px; }"],
    isActive: true,
  },
  {
    info: "scroll-padding is active on element with hidden overflow",
    property: "scroll-padding",
    tagName: "div",
    rules: ["div { overflow: hidden; scroll-padding: 10px; }"],
    isActive: true,
  },
  {
    info: "scroll-padding is inactive on element with visible overflow",
    property: "scroll-padding",
    tagName: "div",
    rules: ["div { scroll-padding: 10px; }"],
    isActive: false,
  },
  {
    info: "scroll-padding is inactive on element with clipped overflow",
    property: "scroll-padding",
    tagName: "div",
    rules: ["div { overflow: clip; scroll-padding: 10px; }"],
    isActive: false,
  },
  {
    info: "scroll-padding is inactive on element with horizontally clipped overflow",
    property: "scroll-padding",
    tagName: "div",
    rules: ["div { overflow-x: clip; scroll-padding: 10px; }"],
    isActive: false,
  },
  {
    info: "scroll-padding is inactive on element with vertically clipped overflow",
    property: "scroll-padding",
    tagName: "div",
    rules: ["div { overflow-y: clip; scroll-padding: 10px; }"],
    isActive: false,
  },
  {
    info: "scroll-padding-top is inactive on element with visible overflow",
    property: "scroll-padding-top",
    tagName: "div",
    rules: ["div { scroll-padding-top: 10px; }"],
    isActive: false,
  },
  {
    info: "scroll-padding-top is inactive on element with horizontally clipped overflow",
    property: "scroll-padding-top",
    tagName: "div",
    rules: ["div { overflow-x: clip; scroll-padding-top: 10px; }"],
    isActive: false,
  },
  {
    info: "scroll-padding-top is inactive on element with vertically clipped overflow",
    property: "scroll-padding-top",
    tagName: "div",
    rules: ["div { overflow-y: clip; scroll-padding-top: 10px; }"],
    isActive: false,
  },
  {
    info: "scroll-padding-top is active on element with horizontally clipped but vertical auto-overflow (as 'clip' is computed to 'hidden')",
    property: "scroll-padding-top",
    tagName: "div",
    rules: [
      "div { overflow-x: clip; overflow-y: auto; scroll-padding-top: 10px; }",
    ],
    isActive: true,
  },
  {
    info: "scroll-padding-top is active on element with vertically clipped but horizontal auto-overflow (as 'clip' is computed to 'hidden')",
    property: "scroll-padding-top",
    tagName: "div",
    rules: [
      "div { overflow-x: auto; overflow-y: clip; scroll-padding-top: 10px; }",
    ],
    isActive: true,
  },
  {
    info: "scroll-padding-right is inactive on element with visible overflow",
    property: "scroll-padding-right",
    tagName: "div",
    rules: ["div { scroll-padding-right: 10px; }"],
    isActive: false,
  },
  {
    info: "scroll-padding-bottom is inactive on element with visible overflow",
    property: "scroll-padding-bottom",
    tagName: "div",
    rules: ["div { scroll-padding-bottom: 10px; }"],
    isActive: false,
  },
  {
    info: "scroll-padding-left is inactive on element with visible overflow",
    property: "scroll-padding-left",
    tagName: "div",
    rules: ["div { scroll-padding-left: 10px; }"],
    isActive: false,
  },
  {
    info: "scroll-padding-block is inactive on element with visible overflow",
    property: "scroll-padding-block",
    tagName: "div",
    rules: ["div { scroll-padding-block: 10px; }"],
    isActive: false,
  },
  {
    info: "scroll-padding-block-end is inactive on element with visible overflow",
    property: "scroll-padding-block-end",
    tagName: "div",
    rules: ["div { scroll-padding-block-end: 10px; }"],
    isActive: false,
  },
  {
    info: "scroll-padding-block-start is inactive on element with visible overflow",
    property: "scroll-padding-block-start",
    tagName: "div",
    rules: ["div { scroll-padding-block-start: 10px; }"],
    isActive: false,
  },
  {
    info: "scroll-padding-inline is inactive on element with visible overflow",
    property: "scroll-padding-inline",
    tagName: "div",
    rules: ["div { scroll-padding-inline: 10px; }"],
    isActive: false,
  },
  {
    info: "scroll-padding-inline-end is inactive on element with visible overflow",
    property: "scroll-padding-inline-end",
    tagName: "div",
    rules: ["div { scroll-padding-inline-end: 10px; }"],
    isActive: false,
  },
  {
    info: "scroll-padding-inline-start is inactive on element with visible overflow",
    property: "scroll-padding-inline-start",
    tagName: "div",
    rules: ["div { scroll-padding-inline-start: 10px; }"],
    isActive: false,
  },
];