| 1 |
<?php |
| 2 |
|
| 3 |
namespace Sabberworm\CSS\Property; |
| 4 |
|
| 5 |
class KeyframeSelector extends Selector |
| 6 |
{ |
| 7 |
/** |
| 8 |
* regexp for specificity calculations |
| 9 |
* |
| 10 |
* @var string |
| 11 |
* |
| 12 |
* @internal since 8.5.2 |
| 13 |
*/ |
| 14 |
const SELECTOR_VALIDATION_RX = '/ |
| 15 |
^( |
| 16 |
(?: |
| 17 |
[a-zA-Z0-9\x{00A0}-\x{FFFF}_^$|*="\'~\[\]()\-\s\.:#+>]* # any sequence of valid unescaped characters |
| 18 |
(?:\\\\.)? # a single escaped character |
| 19 |
(?:([\'"]).*?(?<!\\\\)\2)? # a quoted text like [id="example"] |
| 20 |
)* |
| 21 |
)| |
| 22 |
(\d+%) # keyframe animation progress percentage (e.g. 50%) |
| 23 |
$ |
| 24 |
/ux'; |
| 25 |
} |
| 26 |
|