mirror of
https://github.com/moodle/moodle.git
synced 2025-06-08 00:55:06 +02:00
24 lines
697 B
PHP
24 lines
697 B
PHP
<?php
|
|
|
|
namespace Sabberworm\CSS\Property;
|
|
|
|
class KeyframeSelector extends Selector
|
|
{
|
|
/**
|
|
* regexp for specificity calculations
|
|
*
|
|
* @var string
|
|
*/
|
|
const SELECTOR_VALIDATION_RX = '/
|
|
^(
|
|
(?:
|
|
[a-zA-Z0-9\x{00A0}-\x{FFFF}_^$|*="\'~\[\]()\-\s\.:#+>]* # any sequence of valid unescaped characters
|
|
(?:\\\\.)? # a single escaped character
|
|
(?:([\'"]).*?(?<!\\\\)\2)? # a quoted text like [id="example"]
|
|
)*
|
|
)|
|
|
(\d+%) # keyframe animation progress percentage (e.g. 50%)
|
|
$
|
|
/ux';
|
|
}
|