Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/wincloud_gateway/node_modules/jss/src/plugins/ drwxr-xr-x | |
| Viewing file: Select action/file-type: // @flow
import toCss from '../utils/toCss'
import type {CSSFontFaceRule, RuleOptions, JssStyle, ToCssOptions, BaseRule} from '../types'
export class FontFaceRule implements BaseRule {
type: string = 'font-face'
at: string = '@font-face'
key: string
style: JssStyle
options: RuleOptions
isProcessed: boolean = false
renderable: ?CSSFontFaceRule
constructor(key: string, style: JssStyle, options: RuleOptions) {
this.key = key
this.style = style
this.options = options
}
/**
* Generates a CSS string.
*/
toString(options?: ToCssOptions): string {
if (Array.isArray(this.style)) {
let str = ''
for (let index = 0; index < this.style.length; index++) {
str += toCss(this.at, this.style[index])
if (this.style[index + 1]) str += '\n'
}
return str
}
return toCss(this.at, this.style, options)
}
}
const keyRegExp = /@font-face/
export default {
onCreateRule(key: string, style: JssStyle, options: RuleOptions): FontFaceRule | null {
return keyRegExp.test(key) ? new FontFaceRule(key, style, options) : null
}
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0057 ]-- |