Опубликованный пакет / CLIR
w3c.css_cascade
v0.1.0CSS Cascading and Inheritance Level 5
Пакет можно напечатать самостоятельным модулем на языке общего назначения, который отвечает без движка правил: ответ и статус, без доказательства, хэшей и канонического документа. Всё на этой странице взято из плана кодогенерации, построенного вместе с индексом; витрина ничего не вычисляет сама.
План кодогенерации
План строится: пакет печатается модулем.
- формат плана
- law-backend-plan/0.9
- возможности
- closure, defeasible, negation, status:not_known
Сверка сценариями пакета
совпало 39 из 39 сценариев на ts, py, go
- статусы ответов
- FALSE_ONLY 1 · NEITHER 3 · TRUE_ONLY 35
Целевые языки
gopyts
отвергают этот план · 13
bslверсия плана не поддержана эмиттером: 'law-backend-plan/0.9' (поддержана law-backend-plan/0.7)csверсия плана не поддержана эмиттером: 'law-backend-plan/0.9' (поддержана law-backend-plan/0.7)dartверсия плана не поддержана эмиттером: 'law-backend-plan/0.9' (поддержана law-backend-plan/0.7)erlверсия плана не поддержана эмиттером: 'law-backend-plan/0.9' (поддержана law-backend-plan/0.7)exверсия плана не поддержана эмиттером: 'law-backend-plan/0.9' (поддержана law-backend-plan/0.7)javaверсия плана не поддержана эмиттером: 'law-backend-plan/0.9' (поддержана law-backend-plan/0.7)ktверсия плана не поддержана эмиттером: 'law-backend-plan/0.9' (поддержана law-backend-plan/0.7)luaверсия плана не поддержана эмиттером: 'law-backend-plan/0.9' (поддержана law-backend-plan/0.7)phpверсия плана не поддержана эмиттером: 'law-backend-plan/0.9' (поддержана law-backend-plan/0.7)rbверсия плана не поддержана эмиттером: 'law-backend-plan/0.9' (поддержана law-backend-plan/0.7)rsверсия плана не поддержана эмиттером: 'law-backend-plan/0.9' (поддержана law-backend-plan/0.7)scalaверсия плана не поддержана эмиттером: 'law-backend-plan/0.9' (поддержана law-backend-plan/0.7)swiftверсия плана не поддержана эмиттером: 'law-backend-plan/0.9' (поддержана law-backend-plan/0.7)
./law dev backend corpus/clir/w3c-css-cascade.lawir.json --target ts --target py --target go --out DIR
Интерфейс модуля
Вопросы — публичные отношения с производящим правилом; входы — факты, которые вопрос читает. Имена функций следуют языку: ask_… в Python, ask.… в TypeScript, Ask… в Go.
Вопросы · 3
| Имя | Параметры | Смысл | Читает | Источники |
|---|---|---|---|---|
| cascaded_value_from | text, text, text | declaration is the cascaded value for this property on this elementEN | assigned_to_layerband_rankconditional_group_condition_trueconditional_group_is_element_sensitivecontext_nested_indeclaration_contextdeclaration_origindeclaration_recordeddeclared_by_layer_blockdeclared_by_layer_statementdeclared_by_layered_importdeclared_inside_conditional_groupdeclared_outside_conditional_groupdeclares_propertydocument_orderelement_attachedfirst_declared_beforehas_important_annotationhost_language_assigns_ua_originhost_language_leaves_default_hint_originin_applicable_style_sheetmapped_by_style_rulepresentational_hintproperty_is_knownqualifying_conditions_trueselector_matchesspecificityunlayered_declarationvalue_matches_property_syntax | section/4_2 |
| declaration_origin | text, text | declaration has this cascade originEN | host_language_assigns_ua_originhost_language_leaves_default_hint_originpresentational_hint | section/6_5 |
| wins_cascade | text, text | declaration is sorted before the other by the cascadeEN | assigned_to_layerband_rankconditional_group_condition_trueconditional_group_is_element_sensitivecontext_nested_indeclaration_contextdeclaration_origindeclaration_recordeddeclared_by_layer_blockdeclared_by_layer_statementdeclared_by_layered_importdeclared_inside_conditional_groupdeclared_outside_conditional_groupdeclares_propertydocument_orderelement_attachedfirst_declared_beforehas_important_annotationhost_language_assigns_ua_originhost_language_leaves_default_hint_originin_applicable_style_sheetmapped_by_style_rulepresentational_hintproperty_is_knownqualifying_conditions_trueselector_matchesspecificityunlayered_declarationvalue_matches_property_syntax | section/6_1section/6_4 |
Входы · 29
| Имя | Параметры | Смысл |
|---|---|---|
| assigned_to_layer | text, text | declaration is explicitly assigned to this cascade layerEN |
| band_rank | text, dec | band occupies this position in the origin-and-importance precedence listEN |
| conditional_group_condition_true | text | the condition of the conditional group rule the layer is defined in is trueEN |
| conditional_group_is_element_sensitive | text | the conditional group rule the layer is defined in can evaluate differently for different elements in the documentEN |
| context_nested_in | text, text | the first context is nested inside the second in shadow-including tree orderEN |
| declaration_context | text, text | declaration is sourced from this encapsulation contextEN |
| declaration_origin | text, text | declaration has this cascade originEN |
| declaration_recorded | text | declaration is among the declarations the case recordsEN |
| declared_by_layer_block | text | layer is declared using a @layer block at-ruleEN |
| declared_by_layer_statement | text | layer is declared using a @layer statement at-ruleEN |
| declared_by_layered_import | text | layer is declared using an @import rule with the layer keyword or layer() functionEN |
| declared_inside_conditional_group | text | layer is defined inside a conditional group ruleEN |
| declared_outside_conditional_group | text | layer is not defined inside a conditional group ruleEN |
| declares_property | text, text | declaration declares this propertyEN |
| document_order | text, dec | position of the declaration in document orderEN |
| element_attached | text | declaration is attached directly to an element, such as the contents of a style attributeEN |
| first_declared_before | text, text | the first layer is first declared before the second in the layer order of its origin and contextEN |
| has_important_annotation | text | the last two non-whitespace, non-comment tokens in the declaration's value are the delimiter token ! followed by the identifier token importantEN |
| host_language_assigns_ua_origin | text | the document language defines that this presentational hint enters the cascade as a UA-origin ruleEN |
| host_language_leaves_default_hint_origin | text | the document language does not assign the presentational hint to the UA origin, so it enters the special-purpose author presentational hint originEN |
| in_applicable_style_sheet | text | declaration belongs to a style sheet that currently applies to this documentEN |
| mapped_by_style_rule | text | declaration is mapped by means of a style rule selectorEN |
| presentational_hint | text | declaration is a non-CSS presentational hint translated from the source document's markupEN |
| property_is_known | text | the declaration's property is a known property nameEN |
| qualifying_conditions_true | text | every conditional rule qualifying the declaration has a true conditionEN |
| selector_matches | text, text | declaration belongs to a style rule whose selector matches the elementEN |
| specificity | text, dec, dec, dec | specificity of the style rule the declaration appears in, as computed by the Selectors moduleEN |
| unlayered_declaration | text | declaration is not assigned to any explicit cascade layerEN |
| value_matches_property_syntax | text | the declaration's value matches the syntax for that propertyEN |