Search completed in 0.86 seconds.
1094 results for "Rule":
Your results are loading. Please wait...
Multiple Rules - Archive of obsolete content
« previousnext » all of the examples shown so far have used only a single rule.
... the builder supports the use of multiple rules as well.
... this involves using additional rule elements after the first.
...And 32 more matches
CSSCounterStyleRule - Web APIs
the csscounterstylerule interface represents an @counter-style at-rule.
...his interface inherits from the following parent interfaces: <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/cssrule" target="_top"><rect x="1" y="1" width="75" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="38.5" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">cssrule</text></a><polyline points="76,25 86,20 86,30 76,25" stroke="#d4dde4" fill="none"/><line x1="86" y1="25" x2="116" y2="25" stro...
...ke="#d4dde4"/><a xlink:href="/docs/web/api/csscounterstylerule" target="_top"><rect x="116" y="1" width="190" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="211" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">csscounterstylerule</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent cssrule.
...And 23 more matches
CSSRule - Web APIs
WebAPICSSRule
the cssrule interface represents a single css rule.
... there are several types of rules, listed in the type constants section below.
... the cssrule interface specifies the properties common to all rules, while properties unique to specific rule types are specified in the more specialized interfaces for those rules' respective types.
...And 23 more matches
CSSStyleSheet.insertRule() - Web APIs
the cssstylesheet.insertrule() method inserts a new css rule into the current style sheet, with some restrictions.
... note: although insertrule() is exclusively a method of cssstylesheet, it actually inserts the rule into cssstylesheet.cssrules — its internal cssrulelist.
... syntax stylesheet.insertrule(rule [, index]) parameters rule a domstring containing the rule to be inserted.
...And 21 more matches
Multiple Rule Example - Archive of obsolete content
« previousnext » the most common use of multiple rules is to apply different action bodies to different results.
... <vbox id="photoslist" align="start" datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> <template> <rule> <conditions> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/description" object="?description"/> <triple s...
..."/> </conditions> <action> <hbox uri="?photo" class="box-padded"> <vbox> <label value="?title"/> <image src="?photo"/> </vbox> <groupbox> <caption label="photo details"/> <label value="?description"/> <label value="date: ?date"/> </groupbox> </hbox> </action> </rule> <rule> <conditions> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="?phototitle"/> </conditions> <action> <vbox uri="?photo" class="box-padded"> <label value="?phototitle"/> <image src="?ph...
...And 18 more matches
Rule Compilation - Archive of obsolete content
« previousnext » query a xul template is made up of a query and a series of rules.
...rules the template also contains a set of rules which define content to be generated based on various conditions.
...each rule is declared with a rule tag, and you may have more than one.
...And 14 more matches
Advanced Rules - Archive of obsolete content
« previousnext » this section describes the more advanced rule syntax.
... the full rule syntax the rule syntax described so far is useful for some datasources but sometimes you will need to display data in more complicated ways.
... the simple rule syntax is really just a shortcut for the full rule syntax which is described below.
...And 12 more matches
rule - Archive of obsolete content
ArchiveMozillaXULrule
« xul reference home [ examples | attributes | properties | methods | related ] a rule is used in a template.
... the children of the rule are used to declare the conditions in which the rule matches and the content that is generated.
... a rule may contain where, binding and/or action elements.
...And 12 more matches
CSSKeyframesRule - Web APIs
the csskeyframesrule interface describes an object representing a complete set of keyframes for a css animation.
... it corresponds to the contents of a whole @keyframes at-rule.
... it implements the cssrule interface with a type value of 7 (cssrule.keyframes_rule).
...And 11 more matches
fill-rule - SVG: Scalable Vector Graphics
the fill-rule attribute is a presentation attribute defining the algorithm to use to determine the inside part of a shape.
... note: as a presentation attribute, fill-rule can be used as a css property.
... as a presentation attribute, it can be applied to any element but it has effect only on the following eight elements: <altglyph>, <path>, <polygon>, <polyline>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg viewbox="-10 -10 220 120" xmlns="http://www.w3.org/2000/svg"> <!-- default value for fill-rule --> <polygon fill-rule="nonzero" stroke="red" points="50,0 21,90 98,35 2,35 79,90"/> <!-- the center of the shape has two path segments (shown by the red stroke) between it and infinity.
...And 8 more matches
At-rules - CSS: Cascading Style Sheets
WebCSSAt-rule
at-rules are css statements that instructs css how to behave.
... /* general structure */ @identifier (rule); /* example: tells browser to use utf-8 character set */ @charset "utf-8"; there are several at-rules, designated by their identifiers, each with a different syntax: @charset — defines the character set used by the style sheet.
... nested at-rules — a subset of nested statements, which can be used as a statement of a style sheet as well as inside of conditional group rules: @media — a conditional group rule that will apply its content if the device meets the criteria of the condition defined using a media query.
...And 7 more matches
column-rule - CSS: Cascading Style Sheets
the column-rule shorthand css property sets the width, style, and color of the line drawn between columns in a multi-column layout.
... it is a shorthand property that sets the individual column-rule-* properties in a single, convenient declaration: column-rule-width, column-rule-style, and column-rule-color.
... syntax column-rule: dotted; column-rule: solid 8px; column-rule: solid blue; column-rule: thick inset blue; /* global values */ column-rule: inherit; column-rule: initial; column-rule: unset; the column-rule property is specified as one, two, or three of the values listed below, in any order.
...And 7 more matches
CSSGroupingRule - Web APIs
an object implementing the cssgroupingrule interface represents any css at-rule that contains other rules nested within it.
... objects deriving from it : cssconditionrule and its children: cssmediarule, csssupportsrule, and cssdocumentrule.
... csspagerule syntax the syntax is described using the webidl format.
...And 6 more matches
CSSMediaRule - Web APIs
the cssmediarule interface represents a single css @media rule.
... it implements the cssconditionrule interface, and therefore the cssgroupingrule and the cssrule interface with a type value of 4 (cssrule.media_rule).
... interface cssmediarule : cssconditionrule { readonly attribute medialist media; } properties as a cssconditionrule, and therefore both a cssgroupingrule and a cssrule, cssmediarule also implements the properties of these interfaces.
...And 6 more matches
CSSStyleSheet.addRule() - Web APIs
the obsolete cssstylesheet interface's addrule() legacy method adds a new rule to the stylesheet.
... you should avoid using this method, and should instead use the more standard insertrule() method.
... syntax var result = cssstylesheet.addrule(selector, styleblock, index); parameters selector a domstring specifying the selector portion of the css rule.
...And 6 more matches
CSSNamespaceRule - Web APIs
the cssnamespacerule interface describes an object representing a single css @namespace at-rule.
... it implements the cssrule interface, with a type value of 10 (cssrule.namespace_rule).
... interface cssnamespacerule : cssrule { readonly attribute domstring namespaceuri; readonly attribute domstring?
...And 5 more matches
CSSPageRule - Web APIs
csspagerule is an interface representing a single css @page rule.
... it implements the cssrule interface with a type value of 6 (cssrule.page_rule).
... interface csspagerule : cssrule { attribute domstring selectortext; readonly attribute cssstyledeclaration style; }; properties as a cssrule, csspagerule also implements the properties of this interface.
...And 5 more matches
CSSRuleList - Web APIs
a cssrulelist is an (indirect-modify only) array-like object containing an ordered collection of cssrule objects.
... description each cssrule can be accessed as rules.item(index), or simply rules[index], where rules is an object implementing the cssrulelist interface (such as cssstylesheet.cssrules), and index is the 0-based index of the rule, in the order as it appears in the style sheet css.
... the number of rules in the list is rules.length.
...And 5 more matches
clip-rule - SVG: Scalable Vector Graphics
« svg attribute reference home the clip-rule attribute only applies to graphics elements that are contained within a <clippath> element.
... the clip-rule attribute basically works as the fill-rule attribute, except that it applies to <clippath> definitions.
... the following fragment of code will cause an evenodd clipping rule to be applied to the clipping path because clip-rule is specified on the <path> element that defines the clipping shape: <g> <clippath id="myclip"> <path d="..." clip-rule="evenodd" /> </clippath> <rect clip-path="url(#myclip)" ...
...And 5 more matches
CSSConditionRule - Web APIs
an object implementing the cssconditionrule interface represents a single condition css at-rule, which consists of a condition and a statement block.
... it is a child of cssgroupingrule.
... two objects derive from it : cssmediarule and csssupportsrule.
...And 4 more matches
CSSStyleRule - Web APIs
cssstylerule represents a single css style rule.
... it implements the cssrule interface with a type value of 1 (cssrule.style_rule).
... properties cssstylerule.selectortext returns the textual representation of the selector for this rule, e.g.
...And 4 more matches
CSSStyleSheet.rules - Web APIs
rules is a deprecated legacy property of the cssstylesheet interface.
... functionally identical to the preferred cssrules property, it provides access to a live-updating list of the css rules comprising the stylesheet.
... note: as a legacy property, you not use rules and should instead use the preferred cssrules.
...And 4 more matches
<hr>: The Thematic Break (Horizontal Rule) element - HTML: Hypertext Markup Language
WebHTMLElementhr
historically, this has been presented as a horizontal rule or line.
... while it may still be displayed as a horizontal rule in visual browsers, this element is now defined in semantic terms, rather than presentational terms, so if you wish to draw a horizontal line, you should do so using appropriate css.
... align sets the alignment of the rule on the page.
...And 4 more matches
Intl.PluralRules - JavaScript
the intl.pluralrules object enables plural-sensitive formatting and plural-related language rules.
... constructor intl.pluralrules.pluralrules() creates a new intl.pluralrules object.
... static methods intl.pluralrules.supportedlocalesof() returns an array containing those of the provided locales that are supported without having to fall back to the runtime's default locale.
...And 4 more matches
CSSKeyframeRule - Web APIs
the csskeyframerule interface describes an object representing a set of style for a given keyframe.
... it corresponds to the contains of a single keyframe of a @keyframes at-rule.
... it implements the cssrule interface with a type value of 8 (cssrule.keyframe_rule).
...And 3 more matches
CSSStyleSheet.cssRules - Web APIs
the read-only cssstylesheet property cssrules returns a live cssrulelist which provides a real-time, up-to-date list of every css rule which comprises the stylesheet.
... each item in the list is a cssrule defining a single rule.
... syntax var rules = cssstylesheet.cssrules; value a live-updating cssrulelist containing each of the css rules making up the stylesheet.
...And 3 more matches
CSSStyleSheet.removeRule() - Web APIs
the obsolete cssstylesheet method removerule() removes a rule from the stylesheet object.
... it is functionally identical to the standard, preferred method deleterule().
... note: this is a legacy method which has been replaced by the standard method deleterule().
...And 3 more matches
column-rule-color - CSS: Cascading Style Sheets
the column-rule-color css property sets the color of the line drawn between columns in a multi-column layout.
... syntax /* <color> values */ column-rule-color: red; column-rule-color: rgb(192, 56, 78); column-rule-color: transparent; column-rule-color: hsla(0, 100%, 50%, 0.6); /* global values */ column-rule-color: inherit; column-rule-color: initial; column-rule-color: unset; the column-rule-color property is specified as a single <color> value.
... values <color> the color of the rule that separates columns.
...And 3 more matches
column-rule-style - CSS: Cascading Style Sheets
the column-rule-style css property sets the style of the line drawn between columns in a multi-column layout.
... syntax /* <'border-style'> values */ column-rule-style: none; column-rule-style: hidden; column-rule-style: dotted; column-rule-style: dashed; column-rule-style: solid; column-rule-style: double; column-rule-style: groove; column-rule-style: ridge; column-rule-style: inset; column-rule-style: outset; /* global values */ column-rule-style: inherit; column-rule-style: initial; column-rule-style: unset; the column-rule-style property is specified as a single <'border-style'> value.
... values <'border-style'> is a keyword defined by border-style describing the style of the rule.
...And 3 more matches
column-rule-width - CSS: Cascading Style Sheets
the column-rule-width css property sets the width of the line drawn between columns in a multi-column layout.
... syntax /* keyword values */ column-rule-width: thin; column-rule-width: medium; column-rule-width: thick; /* <length> values */ column-rule-width: 1px; column-rule-width: 2.5em; /* global values */ column-rule-width: inherit; column-rule-width: initial; column-rule-width: unset; the column-rule-width property is specified as a single <'border-width'> value.
... values <'border-width'> is a keyword defined by border-width describing the width of the rule.
...And 3 more matches
CSSSupportsRule - Web APIs
the csssupportsrule interface describes an object representing a single css @supports at-rule.
... it implements the cssconditionrule interface, and therefore the cssrule and cssgroupingrule interfaces with a type value of 12 (cssrule.supports_rule).
... interface csssupportsrule : cssconditionrule { } properties as a cssconditionrule and therefore a cssrule and a cssgroupingrule, csssupportsrule also implements the properties of these interfaces.
...And 2 more matches
Rulers - Firefox Developer Tools
you can overlay horizontal and vertical rulers on a web page: the units are in pixels.
... to be able to toggle rulers for a page, you first need to enable the button by going to the settings page for the developer tools and checking "toggle rulers for the page" under available toolbox buttons.
... once enabled, the "toggle rulers for the page" button appears at the top right of the toolbox, in the same place as the settings/options button.
... behavior to keep in mind when using rulers: the rulers command must be reapplied in new tabs and after each page refresh.
CSSRule.parentStyleSheet - Web APIs
the parentstylesheet property of the cssrule interface returns the stylesheet object in which the current rule is defined.
... syntax var stylesheet = cssrule.parentstylesheet parameters stylesheet is a stylesheet object.
... example if (bgrule.parentstylesheet != mysheet) { // alien style rule!
... } specifications specification status comment css object model (cssom)the definition of 'cssrule: parentstylesheet' in that specification.
CSSStyleDeclaration.parentRule - Web APIs
the cssstyledeclaration.parentrule read-only property returns a cssrule that is the parent of this style block, e.g.
... a cssstylerule representing the style for a css selector.
... syntax var rule = styles.parentrule; value the css rule that contains this declaration block or null if this cssstyledeclaration is not attached to a cssrule.
... example the following javascript code gets the parent css style rule from a cssstyledeclaration: var declaration = document.stylesheets[0].rules[0].style; var rule = declaration.parentrule; specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.parentrule' in that specification.
CSSStyleRule.selectorText - Web APIs
the cssrule.selectortext property gets the textual representation of the selector for the rule set.
... this is readonly in some browsers; to set stylesheet rules dynamically cross-browser, see using dynamic styling information.
... syntax string = cssrule.selectortext example // for cssrule: body { background-color: darkblue; } var stylesheet = document.stylesheets[0]; alert(stylesheet.cssrules[0].selectortext); // body notes the implementation may have stripped out insignificant whitespace while parsing the selector.
... specifications specification status comment css object model (cssom)the definition of 'cssstylerule.selectortext' in that specification.
CSSStyleSheet.deleteRule() - Web APIs
the cssstylesheet method deleterule() removes a rule from the stylesheet object.
... syntax cssstylesheet.deleterule(index) parameters index the index into the stylesheet's cssrulelist indicating the rule to be removed.
... return value undefined example this example removes the first rule from the stylesheet mystyles.
... mystyles.deleterule(0); specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.deleterule()' in that specification.
CSSStyleSheet.ownerRule - Web APIs
the read-only cssstylesheet property ownerrule returns the cssimportrule corresponding to the @import at-rule which imported the stylesheet into the document.
... syntax var ownerrule = cssstylesheet.ownerrule; value a cssimportrule corresponding to the @import rule which imported the stylesheet into the document.
... examples this snippet of code looks for rules which were not imported into the document using an @import at-rule.
... let rulelist = document.stylesheets[0].cssrules; for (let rule of rulelist) { if (!rule.ownerrule) { /* rule is not imported */ } } this snipped obtains a reference to the stylesheet associated with the @import and processes it in some manner: let rulelist = document.stylesheets[0].cssrules; for (let rule of rulelist) { if (rule.ownerrule) { checkstylesheet(rule.ownerrule.stylesheet); } } specifications specification status comment css object model (cssom)the definition of 'cssstylesheet.ownerrule' in that specification.
Intl.PluralRules() constructor - JavaScript
the intl.pluralrules() constructor creates intl.pluralrules objects.
... syntax new intl.pluralrules([locales[, options]]) parameters locales optional.
... var pr = new intl.pluralrules(); pr.select(0); // → 'other' if in us english locale pr.select(1); // → 'one' if in us english locale pr.select(2); // → 'other' if in us english locale using options the results can be customized using the options argument, which has one property called type which you can set to ordinal.
... var pr = new intl.pluralrules('en-us', { type: 'ordinal' }); pr.select(0); // → 'other' pr.select(1); // → 'one' pr.select(2); // → 'two' pr.select(3); // → 'few' pr.select(4); // → 'other' pr.select(42); // → 'two' specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.pluralrules() constructor' in that specification.
Intl.PluralRules.prototype.resolvedOptions() - JavaScript
the intl.pluralrules.prototype.resolvedoptions() method returns a new object with properties reflecting the locale and plural formatting options computed during initialization of this pluralrules object.
... syntax pluralrule.resolvedoptions() return value a new object with properties reflecting the locale and plural formatting options computed during the initialization of the given pluralrules object.
... examples using the resolvedoptions method var de = new intl.pluralrules('de-de'); var usedoptions = de.resolvedoptions(); usedoptions.locale; // "de-de" usedoptions.maximumfractiondigits; // 3 usedoptions.minimumfractiondigits; // 0 usedoptions.minimumintegerdigits; // 1 usedoptions.pluralcategories; // array [ "one", "other" ] usedoptions.type; // "cardinal" specifications specification ecmascript internat...
...ionalization api (ecma-402)the definition of 'intl.pluralrules.prototype.resolvedoptions' in that specification.
Intl.PluralRules.select() - JavaScript
the intl.pluralrules.prototype.select method returns a string indicating which plural rule to use for locale-aware formatting.
... syntax pluralcategory = pluralrule.select(number) parameters number the number to get a plural rule for.
... description this function selects a pluralization category according to the locale and formatting options of a pluralrules object.
... examples using select() new intl.pluralrules('ar-eg').select(0); // → 'zero' new intl.pluralrules('ar-eg').select(1); // → 'one' new intl.pluralrules('ar-eg').select(2); // → 'two' new intl.pluralrules('ar-eg').select(6); // → 'few' new intl.pluralrules('ar-eg').select(18); // → 'many' specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.pluralrules.select()' in that specification.
Accesskey display rules - Archive of obsolete content
this document describes the rules of generating a label text.
...basic accesskey display rules on non-mac platforms, a character which is same as its accesskey is underlined.
...always appends accesskey text the basic rules are enough for western locales.
CSSRule.cssText - Web APIs
WebAPICSSRulecssText
the csstext property of the cssrule interface returns the actual text of a cssstylesheet style-rule.
...therefore, to modify it, use the stylesheet's cssrules[index] properties .selectortext and .style (or its sub-properties).
... syntax string = cssrule.csstext example <style> body { background-color: darkblue; } </style> <script> var stylesheet = document.stylesheets[0]; alert(stylesheet.cssrules[0].csstext); // body { background-color: darkblue; } </script> specifications specification status comment css object model (cssom)the definition of 'cssrule: csstext' in that specification.
Intl.PluralRules.supportedLocalesOf() - JavaScript
the intl.pluralrules.supportedlocalesof() method returns an array containing those of the provided locales that are supported in plural formatting without having to fall back to the runtime's default locale.
... syntax intl.pluralrules.supportedlocalesof(locales[, options]) parameters locales a string with a bcp 47 language tag, or an array of such strings.
... var locales = ['ban', 'id-u-co-pinyin', 'de-id']; var options = { localematcher: 'lookup' }; console.log(intl.pluralrules.supportedlocalesof(locales, options).join(', ')); // → "id-u-co-pinyin, de-id" specifications specification ecmascript internationalization api (ecma-402)the definition of 'intl.pluralrules.supportedlocalesof' in that specification.
CSSNamespaceRule.namespaceURI - Web APIs
the cssnamespacerule.namespaceuri read-only property returns a domstring containing the text of the uri of the given namespace.
... syntax var namespaceuri = cssnamespacerule.namespaceuri returns a domstring containing a uri.
CSSNamespaceRule.prefix - Web APIs
the cssnamespacerule.prefix read-only property returns a domstring with the name of the prefix associated to this namespace.
... syntax var prefix = cssnamespacerule.prefix returns a domstring containing the prefix associated to this namespace.
CSSStyleRule.style - Web APIs
the cssrule.style property is the cssstyledeclaration interface for the declaration block of the cssrule.
... syntax styleobj = cssrule.style example function stilo() { alert(document.stylesheets[0].cssrules[0].style.csstext); } // displays "background-color: gray;" notes the declaration block is that part of the style rule that appears within the braces and that actually provides the style definitions (for the selector, the part that comes before the braces).
CSSStyleRule.styleMap - Web APIs
the stylemap read-only property of the cssstylerule interface returns a stylepropertymap object which provides access to the rule's property-value pairs.
... syntax var stylepropertymap = cssstylerule.stylemap; value a stylepropertymap object.
HTMLTableElement.rules - Web APIs
the htmltableelement.rules property indicates which cell borders to render in the table.
... syntax htmltableelement.rules = rules; var rules = htmltableelement.rules; parameters rules is a string with one of the following values: none no rules groups lines between groups only rows lines between rows cols lines between cols all lines between all cells example // turn on all the internal borders of a table var t = document.getelementbyid("tableid"); t.rules = "all"; specification w3c dom 2 html specification ...
CSS Conditional Rules - CSS: Cascading Style Sheets
css conditional rules is a css module that allows to define a set of rules that will only apply based on the capabilities of the processor or the document the style sheet is being applied to.
... reference at-rules @document @media @supports @import specifications specification status comment css conditional rules module level 3 candidate recommendation initial definition ...
nsIMsgRuleAction
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgfilter.idl [scriptable, uuid(190a2a18-d245-473a-a402-9f0814598c7f)] interface nsimsgruleaction : nsisupports { attribute nsmsgruleactiontype type; // target priority..
nsMsgRuleActionType
defined in comm-central/ mailnews/ base/ search/ public/ nsmsgfiltercore.idl typedef long nsmsgruleactiontype; [scriptable, uuid(59af7696-1e28-4642-a400-fa327ae0b8d8)] interface nsmsgfilteraction { /* if you change these, you need to update filter.properties, look for filteractionx */ /* these longs are all actually of type nsmsgfilteractiontype */ const long custom=-1; /* see nsmsgfilteraction */ const long none=0; /* uninitialized state */ const long movetofolder=1; const long changepriority=2; const long delete=3; const long markread=4; const long killthread=5; const long watchthread=6; const long markflagged=7; const long label=8; const long reply=9; const long forward=10; const long stopexecution=11;...
Style System Overview - Archive of obsolete content
style system style sheets & rules ↓ rule tree ↓ style context interface style sheets & rules nsistyleruleprocessor and nsistylesheet describe in c++ what a css stylesheet can do nsistylerule describes in c++ what a css style rule can do main implementations are for css, but we have other implementations in c++ that: do what css can't do do things faster than css would css style sheets at basic level, sheet is collection of rules other special things: @import, @media, @namespace, etc.
... a rule is a selector and a declaration block.
... p { color: green; font-size: 12em; } selector { property: value; property: value; } css style rules what do style rules mean?
...And 60 more matches
Index - Web APIs
WebAPIIndex
api, audionode, property, reference, web audio api, channelcountmode the possible values of channelcountmode and their meanings are: 159 audionode.channelinterpretation api, audionode, property, reference, web audio api, channelinterpretation when the number of channels doesn't match between an input and an output, up- or down-mixing happens according the following rules.
... 403 cssconditionrule api, cssom, interface, reference an object implementing the cssconditionrule interface represents a single condition css at-rule, which consists of a condition and a statement block.
... it is a child of cssgroupingrule.
...And 47 more matches
Localization and Plurals
usage here are a couple terms used in this page to help keep things clear: plural rule: for a given language, there is a grammatical rule on how to change words, depending on the number qualifying the word.
... different languages can have different rules.
... plural form: for a particular plural rule, there can be multiple forms of a word, such as "page" and "pages".
...And 37 more matches
Examine and edit CSS - Firefox Developer Tools
examine css rules the rules view lists all the rules that apply to the selected element, ordered from most-specific to least-specific: the four buttons on the right top of the rules view allow you to change the display of certain css and rules view features.
... you can: toggle pseudo-classes; toggle classes; add a new rule; change the display based on the color scheme preference (as of firefox 72, you must set devtools.inspector.color-scheme-simulation.enabled to true in the configuration editor to enable this feature); change the display based on print media rules.
... a warning icon appears next to unsupported css properties or rules that have invalid values.
...And 34 more matches
Index - Archive of obsolete content
104 stylesheet/style modify styles using stylesheet files or css rules.
...for this we have to first create four icons, one for each tinderbox state (none, success, test failed, and busted), then create a set of css rules that displays the icon corresponding to the current tinderbox state: 398 tinderbox add-ons, extensions tinderbox is a web tool for tracking the status of the mozilla source code.
... 460 style system overview gecko style sheets & rules ↓ rule tree ↓ style context interface 461 using microformats firefox 3, microformats microformats allow web sites to provide semantic data to the browser in order to make it possible to present summaries of the information on a page without having to know how to parse the document itself.
...And 28 more matches
Cascade and inheritance - Learn web development
conflicting rules css stands for cascading style sheets, and that first word cascading is incredibly important to understand — the way that the cascade behaves is key to understanding css.
...usually the problem is that you have created two rules which could potentially apply to the same element.
... the cascade, and the closely-related concept of specificity, are mechanisms that control which rule applies when there is such a conflict.
...And 25 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
918 template guide xul, xul_template_guide basics of xul templates 919 actions xul, xul_template_guide the content to generate in a template is specified using the action element which should either be the next sibling of the query element (if no rules need be specified) or be a direct child of a rule element.
... 931 multiple rule example xul, xul_template_guide no summary!
... 932 multiple rules xul, xul_template_guide no summary!
...And 23 more matches
Mozilla Style System Documentation
these three types of style contexts correspond to the three ways of creating a style context: nsiprescontext::resolvestylecontextfor, nsiprescontext::resolvepseudostylecontextfor, and.nsiprescontext::resolvestylecontextfornonelement there is also a fourth method, nsiprescontext::probepseudostylecontextfor, which creates a style context only if there are style rules that match the pseudo-element.
...the pres context forwards these calls to its style set object (stylesetimpl, interface nsistyleset), which does the real work (and also maintains the lists of stylesheets and owns the rule tree).
... these methods may all return an existing style context rather than a new one (see stylesetimpl::getcontext), if there is a current style context with the same parent, that matches the same rules (a check that is easy because of the ruletree), and is for the same pseudo-element (or not for a pseudo-element, or a "non-element").
...And 23 more matches
Special Condition Tests - Archive of obsolete content
templates have a means of allowing a rule to match only if the generated content would be inserted inside an element with a particular tag name.
... for instance, if the container was a <vbox>, a rule could be created that would only match a <vbox> element.
...here is a previous example, rewritten to use the parent matching syntax: <vbox datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="*"/> <rule parent="vbox"> <action> <groupbox uri="?"> <caption label="?name"/> </groupbox> </action> </rule> <rule> <action> <label uri="?" value="?name"/> </action> </rule> </template> </vbox> previously, an assign element was used to assign the tagname of the result to a variable, which was then compared in a rule condition.
...And 21 more matches
Templates - Archive of obsolete content
rules in the image of the earlier example, you may have noticed that the third button is simply a button with hyphens on it.
... we can do this by using the rule element.
... we define a rule for each variation of elements that we want to have created.
...And 18 more matches
How CSS is structured - Learn web development
each css rule starts with a selector—or a list of selectors—in order to tell the browser which element or elements the rules should apply to.
... h1 a:link .manythings #onething * .box p .box p:first-child h1, h2, .intro try creating some css rules that use the selectors above.
...both rules apply.
...And 18 more matches
CSS FAQ - Learn web development
LearnCSSHowtoCSS FAQ
modern browsers have two main rendering modes: quirks mode: also called backwards-compatibility mode, allows legacy webpages to be rendered as their authors intended, following the non-standard rendering rules used by older browsers.
... use a class-specific style when you want to apply the styling rules to many blocks and elements within the page, or when you currently only have element to style with that style, but you might want to add more later.
... use an id-specific style when you need to restrict the applied styling rules to one specific block or element.
...And 18 more matches
nsIXULTemplateBuilder
the structure of a template is as follows: <rootnode datasources="" ref=""> <template> <queryset> <query></query> <rule> <conditions>...</conditions> <bindings>...</bindings> <action>...</action> </rule> </queryset> </template> </rootnode> the datasources attribute on the root node is used to identify the source of data to be used.
...the <queryset> element contains a single query and one or more <rule> elements.
... there may be more than one <queryset> if multiple queries are desired, and this element is optional if only one query is needed -- in that case the <query> and <rule>s are allowed to be children of the <template> node.
...And 18 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
5 api codingscripting, glossary, infrastructure an api (application programming interface) is a set of features and rules that exist inside a software program (the application) enabling interaction with it through software - as opposed to a human user interface.
... 86 conditional beginner, codingscripting, glossary a condition is a set of rules that can interrupt normal code execution or change it, depending on whether the condition is completed or not.
... 109 descriptor (css) css, codingscripting, glossary, needscontent a css descriptor defines the characteristics of an at-rule.
...And 17 more matches
Scaling of SVG backgrounds - CSS: Cascading Style Sheets
the algorithm, in summary the algorithm can for the most part be summarized by these four rules.
... there are some edge cases that aren't covered by these rules, but this covers the majority of cases.
... specifying fixed lengths for both dimensions if you use background-size to specify fixed lengths for both dimensions, those lengths are always used, per rule 1 above.
...And 17 more matches
Challenge solutions - Developer guides
solution in the menu above the right-hand pane, choose css rules.
... solution move the declaration for underlining from the rule for <p> to the one for <strong>.
... the resulting file looks like this: p {color: blue; } strong {color: orange; text-decoration: underline;} later sections of this tutorial describe style rules and declarations in greater detail.
...And 16 more matches
CSSStyleSheet - Web APIs
the cssstylesheet interface represents a single css stylesheet, and lets you inspect and modify the list of rules contained in the stylesheet.
... a stylesheet consists of a collection of cssrule objects representing each of the rules in the stylesheet.
... the rules are contained in a cssrulelist, which can be obtained from the stylesheet's cssrules property.
...And 13 more matches
Writing Skinnable XUL and CSS - Archive of obsolete content
the following document outlines rules that one must abide by when writing a skin.
...there is one notable exception to this rule.
...this rule also applies when designing a css file for a ui component that will be overlayed into other components.
...And 12 more matches
Common Firefox theme issues and solutions - Archive of obsolete content
the problem is commonly caused by a -moz-appearance:menulist style rule in chrome://global/skin/menulist.css.
... once the offending rule is found, it should be deleted and manual styling used.
...the fix is to make sure any style rule that references #appmenu-button also has a comparable reference to #appmenu-toolbar-button in chrome://browser/skin/browser.css.
...And 12 more matches
Examples - Archive of obsolete content
</p> <p> this document contains inline css rules contained in a <code>style</code> element and surrounded by a comment and javascript contained in a <code>script</code> element and surrounded by a comment.
... </p> </body> </html> back to the article examples for "using css rules in inline style within comments" example 1 <!-- this file should have a .html extension --> <!doctype html public "-//w3c//dtd xhtml 1.0 strict//en" "http://www.w3.org/tr/xhtml1/dtd/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-us" xml:lang="en-us"> <head> <title>example 1 - xhtml 1.0 strict as text/html</title> <meta http-equiv="content-type" content="text/h...
... </p> <p> this document contains inline css rules contained in a <code>style</code> element and surrounded by a sgml comment.
...And 12 more matches
Syntax - CSS: Cascading Style Sheets
WebCSSSyntax
css rulesets if style sheets could only apply a declaration to each element of a web page, they would be pretty useless.
...a selector group and an associated declarations block, together, are called a ruleset, or often simply a rule.
... a css ruleset (or rule) is visualized in the diagram below.
...And 12 more matches
Organizing your CSS - Learn web development
keep it consistent if you get to set the rules for the project or are working alone, then the most important thing to do is to keep things consistent.
...if spaces, how many spaces?) having a set of rules you always follow reduces the amount of mental overhead needed when writing css, as some of the decisions are already made.
...some developers put all of the rules onto a single line, like so: .box { background-color: #567895; } h2 { background-color: black; color: white; } other developers prefer to break everything onto a new line: .box { background-color: #567895; } h2 { background-color: black; color: white; } css doesn't mind which one you use.
...And 11 more matches
inIDOMUtils
nsidomelement aelement); nsidomnodelist getchildrenfornode(in nsidomnode anode, in boolean ashowinganonymouscontent); unsigned long long getcontentstate(in nsidomelement aelement); void getcsspropertynames([optional] in unsigned long aflags, [optional] out unsigned long acount, [retval, array, size_is(acount)] out wstring aprops); nsisupportsarray getcssstylerules(in nsidomelement aelement, [optional] in domstring apseudo); nsidomnode getparentfornode(in nsidomnode anode, in boolean ashowinganonymouscontent); unsigned long getruleline(in nsidomcssstylerule arule); unsigned long getrulecolumn(in nsidomcssstylerule arule); unsigned long getselectorcount(in nsidomcssstylerule arule); astring getselectortext(in nsi...
...domcssstylerule arule, in unsigned long aselectorindex); unsigned long long getspecificity(in nsidomcssstylerule arule, in unsigned long aselectorindex); nsidomfontfacelist getusedfontfaces(in nsidomrange arange); bool haspseudoclasslock(in nsidomelement aelement, in domstring apseudoclass); boolean isignorablewhitespace(in nsidomcharacterdata adatanode); bool isinheritedproperty(in astring apropertyname); void parsestylesheet(in nsidomcssstylesheet asheet, in domstring ainput); void removepseudoclasslock(in nsidomelement aelement, in domstring apseudoclass); astring rgbtocolorname(in octet ar, in octet ag, in octet ab); bool selectormatcheselement(in nsidomelement aelement, in nsidomcssstylerule arule, in unsig...
... acount optional count aprops properties getcssstylerules() returns an array of the css style rules on the specified element.
...And 11 more matches
Migrating from Firebug - Firefox Developer Tools
edit css both tools allow to view and edit the css rules related to the element selected within the node view in a similar way.
... firebug has a style side panel for this, the devtools have a rules side panel.
... in firebug you add new rules by right-clicking and choosing add rule...
...And 11 more matches
Specificity - CSS: Cascading Style Sheets
specificity is based on the matching rules which are composed of different sorts of css selectors.
...as per css rules, directly targeted elements will always take precedence over rules which an element inherits from its ancestor.
... the !important exception when an important rule is used on a style declaration, this declaration overrides any other declarations.
...And 11 more matches
Creating a Skin - Archive of obsolete content
adding style rules first, let's decide what kind of changes we want to make.
... the following style rules added to findfile.css will cause the changes shown in the accompanying image.
... the first rule above (for 'window > box') specifies that the child box of the window has a different color.
...And 10 more matches
Fundamental CSS comprehension - Learn web development
grab the css resources text file — this contains a set of raw selectors and rulesets that you'll need to study and combine to answer part of this assessment.
... the first two rulesets in the css resource file are yours, for free!
... above the two rules, add a css comment with some text inside it to indicate that this is a set of general styles for the overall page.
...And 10 more matches
Practical positioning examples - Learn web development
first, add the following rule at the bottom of your css to remove the default padding-left and margin-top from the unordered list: .info-box ul { padding-left: 0; margin-top: 0; } note: we are using descendant selectors with .info-box at the start of the chain throughout this example — this is so that we can insert this feature into a page with other content already on it, without fear of interfering with the styles ...
...secondly, we'll set a rule that puts the same styling on one of the tabs when a class of active is present on it.
... first, of all, add the following rule to style the .panels <div> container.
...And 10 more matches
CSS basics - Learn web development
anatomy of a css ruleset let's dissect the css code for red paragraph text to understand how it works : the whole structure is called a ruleset.
... (the term ruleset is often referred to as just rule.) note the names of the individual parts: selector this is the html element name at the start of the ruleset.
... declaration this is a single rule like color: red;.
...And 10 more matches
Mozilla Style System
the style system actually has relatively little to do with style sheets; it instead deals with style rule processors.
... nsistyleruleprocessor a style rule processor represents an origin within the css cascade.
... thus there is a single style rule processor for all user-agent css style sheets, a single style rule processor for all user css style sheets, and a single style rule processor for all author css style sheets.
...And 10 more matches
Template Logging - Archive of obsolete content
each result is logged in a form much like the following: in template with id root using ref http://www.some-fictitious-zoo.com/birds new active result for query 2 matching rule 1: http://www.some-fictitious-zoo.com/birds/emperorpenguin in the example above, a new result has been added.
...the example also specifies 'query 2 matching rule 1'.
...in addition, this result matches the first <rule> of query 2.
...And 9 more matches
LiveConnect Overview - Archive of obsolete content
these conversions are described in the following sections: javascript to java conversions java to javascript conversions javascript to java conversions when you call a java method and pass it parameters from javascript, the data types of the parameters you pass in are converted according to the rules described in the following sections: number values boolean values string values undefined values null values javaarray and javaobject objects javaclass objects other javascript objects the return values of methods of netscape.javascript.jsobject are always converted to instances of java.lang.object.
... the rules for converting these return values are also described in these sections.
... for example, if jsobject.eval returns a javascript number, you can find the rules for converting this number to an instance of java.lang.object in number values.
...And 9 more matches
Properly Using CSS and JavaScript in XHTML Documents - Archive of obsolete content
however when an xhtml page is served with mime type text/xml or application/xhtml+xml, then it should be treated as an xml document which must conform to the strict rules for authoring and displaying xml.
... proper xhtml is an application of xml and as such requires that authors follow strict rules when authoring xhtml.
... } //]]> </script> examples using css rules in inline style within comments example 1 - xhtml 1.0 strict as text/html this example illustrates the behavior of xhtml served as text/html when css rules are contained inline and surrounded by comments.
...And 9 more matches
@supports - CSS: Cascading Style Sheets
WebCSS@supports
the @supports css at-rule lets you specify declarations that depend on a browser's support for one or more specific css features.
...the rule may be placed at the top level of your code or nested inside any other conditional group at-rule.
... @supports (display: grid) { div { display: grid; } } @supports not (display: grid) { div { float: right; } } in javascript, @supports can be accessed via the css object model interface csssupportsrule.
...And 9 more matches
Styling Columns - CSS: Cascading Style Sheets
this guide explains how to change the gap and style rules between columns.
... column rules the specification defines column-rule-width, column-rule-style and column-rule-color, providing a shorthand column-rule.
... these properties work in exactly the same way as the border properties: any valid border-style can be used as a column-rule-style.
...And 9 more matches
RDF Datasources - Archive of obsolete content
example 1 : source <tree flex="1" datasources="rdf:history" ref="nc:historyroot"> <treecols> <treecol id="name" label="name" flex="1"/> <treecol id="url" label="url" flex="1"/> <treecol id="date" label="date" flex="1"/> </treecols> <template> <rule> <treechildren> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://home.netscape.com/nc-rdf#name"/> <treecell label="rdf:http://home.netscape.com/nc-rdf#url"/> <treecell label="rdf:http://home.netscape.com/nc-rdf#date"/> </treerow> </treeitem> </treechildren> </rule> </template> </tree> other datasource...
...you can use rules to match specific types of content.
... the attributes on the rule element will match if they match the attributes on an rdf description element.
...And 8 more matches
Trees and Templates - Archive of obsolete content
multiple rules can be used to indicate different content for different types of data.
...example 1 : source <tree id="my-tree" flex="1" datasources="rdf:files" ref="nc:filesroot" flags="dont-build-content"> <treecols> <treecol id="name" label="name" primary="true" flex="1"/> <splitter/> <treecol id="date" label="date" flex="1"/> </treecols> <template> <rule> <treechildren> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://home.netscape.com/nc-rdf#name"/> <treecell label="rdf:http://home.netscape.com/web-rdf#lastmodifieddate"/> </treerow> </treeitem> </treechildren> </rule> </template> </tree> here, a tree is created with two columns, for the...
...only one rule is used, but you may add others if needed.
...And 8 more matches
Getting started with CSS - Learn web development
adding css to our document the very first thing we need to do is to tell the html document that we have some css rules we want it to use.
...you can test that the css works by adding a rule to styles.css.
...if i want all paragraphs and all list items to be green my rule looks like this: p, li { color: green; } try this out in the interactive editor below (edit the code boxes), or in your local css document.
...And 8 more matches
Using feature queries - CSS: Cascading Style Sheets
feature queries are created using the css at-rule @supports, and are useful as they give web developers a way to test to see if a browser has support for a certain feature, and then provide css that will only run based on the result of that test.
... syntax css feature queries are part of the css conditional rules module, which also contains the media query @media rule; when you use feature queries, you will find they behave in a similar way to media queries.
... a feature query consists of the @supports rule, followed by the property name and value you would like to test for.
...And 8 more matches
XUL Template Primer - Bindings - Archive of obsolete content
the <bindings> element is used to create additional,optional variable bindings, in addition to those that are specified in a rule's <conditions>.
... this is different from the variables specified in the rule's conditions, where a value must be found for each variable for the rule to match.
... if a <binding> can't be matched, the rule will still fire.
...And 7 more matches
Debugging CSS - Learn web development
if you look at the rules view to the right of your html, you should be able to see the css properties and values applied to that element.
... you will see the rules directly applied to class box1 and also the css that is being inherited by the box from its ancestors, in this case to <body>.
...perhaps it is being inherited from a parent element and you need to add a rule to overwrite it in the context of this element.
...And 7 more matches
Legacy layout methods - Learn web development
add the following rule below your previous one: .row { clear: both; } applying this clearing means that we don’t need to completely fill each row with elements making the full twelve columns.
... our next step is to create a rule for the class .col, floating it left, giving it a margin-left of 20 pixels to form the gutter, and a width of 60 pixels.
... add the following rule to the bottom of your css: .col { float: left; margin-left: 20px; width: 60px; background: rgb(255, 150, 150); } the top row of single columns will now lay out neatly as a grid.
...And 7 more matches
Styling links - Learn web development
to start off with, we'll write out our empty rulesets: a { } a:link { } a:visited { } a:focus { } a:hover { } a:active { } this order is important because the link styles build on one another, for example the styles in the first rule will apply to all the subsequent ones, and when a link is being activated, it is also being hovered over.
...this certainly looks different to the default styling, but it still provides a familiar enough experience for users to know what's going on: the first two rules are not that interesting to this discussion.
... the third rule uses the a selector to get rid of the default text underline and focus outline (which varies across browsers anyway), and adds a tiny amount of padding to each link — all of this will become clear later on.
...And 7 more matches
Introducing the CSS Cascade - CSS: Cascading Style Sheets
WebCSSCascade
this means that at-rules containing entities other than declarations, such as a @font-face rule containing descriptors, don't participate in the cascade.
... in these cases, only the at-rule as a whole participates in the cascade: here, the @font-face identified by its font-family descriptor.
... if several @font-face rules with the same descriptor are defined, only the most appropriate @font-face, as a whole, is considered.
...And 7 more matches
CSS reference - CSS: Cascading Style Sheets
WebCSSReference
use this css reference to browse an alphabetical index of all of the standard css properties, pseudo-classes, pseudo-elements, data types, and at-rules.
... basic rule syntax style rule syntax style-rule ::= selectors-list { properties-list } ...
... style rule examples strong { color: red; } div.menu-bar li:hover > ul { display: block; } for a beginner-level introduction to the syntax of selectors, see our guide on css selectors.
...And 7 more matches
Media - Progressive web apps (PWAs)
to specify rules that are specific to a type of media, use @media followed by the media type, followed by curly braces that enclose the rules.
...this css (below) removes the navigation area when printing the document: @media print { #nav-area {display: none;} } some common media types are: screen color device display print printed paged media projection projected display all all media (the default) more details there are other ways to specify the media type for a set of rules.
... these are ways of separating styling rules for different media types into different files.
...And 7 more matches
CSS3 - Archive of obsolete content
css namespaces module recommendation since september 29th, 2011 adds the support for the xml namespaces by defining the notion of css qualified name, using the ' | ' syntax and adding the @namespace css at-rule.
... adds: support for downloadable fonts via the css @font-face at-rule.
...it also extends the related css font-variant shorthand property and introduces the @font-feature-values at-rule.
...And 6 more matches
Multiple Queries - Archive of obsolete content
to use multiple queries, place each query element along with its rules inside a queryset element.
... </query> <rule> ...
... </rule> </queryset> <queryset> <query> ...
...And 6 more matches
Simple Query Syntax - Archive of obsolete content
the triples to check are specified using attributes on the rule element (thus, a rule element should be used).
...for example, to filter for photos with a specific country: <hbox id="photoslist" datasources="template-guide-photos4.rdf" ref="http://www.xulplanet.com/rdf/myphotos" xmlns:r="http://www.xulplanet.com/rdf/"> <template> <rule r:country="http://www.daml.org/2001/09/countries/iso#it"> <vbox class="box-padded" uri="rdf:*"> <image src="rdf:*"/> <label value="rdf:http://purl.org/dc/elements/1.1/title"/> </vbox> </rule> </template> </hbox> this example shows how a single attribute may be used to filter for only those results that have a country set to 'http://www.daml.org/2001/09/countries...
...this form of attribute syntax on a rule is equivalent to a <triple> in the extended syntax.
...And 6 more matches
Skinning XUL Files by Hand - Archive of obsolete content
to avoid this, the makers of the css specification have created some rules of precedence that look at how many different rules have been defined for an element, where the style definitions appear (i.e., externally in a css file or inline), where the elements themselves appear, and other esoteric variables.
...to keep your xul looking consistent and to avoid breaking skins altogether (when your styles have some dependency on a part of the global skin that changes, such as an image), use the style rules in the global skin by importing it into your stylesheet with the following instruction: @import url("chrome://global/skin/"); refer to the document writing skinnable xul and css for guidelines on how to make your skins friendly to the global skin, to xul, and to mozilla.
...le-attribute2: value; style-attribute3: value; } for example, the following definition -- were it not in serious conflict with the many menu style definitions in the global skin -- makes all xul menus appear with a one pixel border, a light blue background, and 10 point fonts: menu { border: 1px; background-color: lightblue; font-size: 10pt; } in addition to these basic element style rules, css also provides for the application of style information to classes of elements, and element ids.
...And 6 more matches
Multiple-column layout - Learn web development
adding a rule between columns with column-rule.
...now add a rule between the columns, with column-rule.
... in a similar way to the border property that you encountered in previous lessons, column-rule is a shorthand for column-rule-color, column-rule-style, and column-rule-width, and accepts the same values as border.
...And 6 more matches
How CSS works - Learn web development
the browser parses the fetched css, and sorts the different rules by their selector types into different "buckets", e.g.
...based on the selectors it finds, it works out which rules should be applied to which nodes in the dom, and attaches style to them as required (this intermediate step is called a render tree).
... the render tree is laid out in the structure it should appear in after the rules have been applied to it.
...And 6 more matches
ESLint
running eslint eslint comprises of a set of rules that are used to analyse the code for correctness and style consistency.
... meeting these rules before review will help reduce the amount of review time, and the revisions necessary to have a review granted.
... understanding rules and errors not all files are linted currently eslint runs on: .js .jsx .jsm .xml .html .xhtml additionally, some directories and files are ignored, see the .eslintignore file handling errors if your code fails an eslint rule, you'll get an error similar to this: /gecko/toolkit/mozapps/installer/js-compare-ast.js 18:39 error 'snarf' is not defined.
...And 6 more matches
@keyframes - CSS: Cascading Style Sheets
the @keyframes css at-rule controls the intermediate steps in a css animation sequence by defining styles for keyframes (or waypoints) along the animation sequence.
... description javascript can access the @keyframes at-rule with the css object model interface csskeyframesrule.
... to use keyframes, create a @keyframes rule with a name that is then used by the animation-name property to match an animation to its keyframe declaration.
...And 6 more matches
Anonymous Content - Archive of obsolete content
content generation rules for generation whenever bindings are attached to an element, anonymous content will potentially be generated or destroyed.
...whenever an element is inserted or appended, all insertion points are checked following all the same rules that applied when first placing explicit children during anonymous content generation.
...exceptions to the rule are noted below.
...And 5 more matches
Fixing Table Inheritance in Quirks Mode - Archive of obsolete content
fortunately, the behavior can be overcome in all cases with a single css2 rule.
...this represented a violation of css inheritance rules, and led many authors to create workarounds such as: <style type="text/css"> body, table, td {font-size: 11px;} </style> recreating legacy behavior to avoid "breaking" older pages that were authored with old-browser behaviors in mind, mozilla and related browsers will mimic old browsers when in "quirks" mode.
... to do this, the gecko rendering engine uses the following rule in the quirk.css user agent file: /* quirk: cut off all font inheritance in tables and captions except for family.
...And 5 more matches
Creating localizable web applications
use the dir attribute on the <html/> element and consider using a rtl class on <html/> or <body/> as well, in order to easily change css rules like in the example below.
...good: css: html[dir='rtl'] foo { /* rtl-specific rules for the foo element */ } body.rtl foo { /* rtl-specific rules for the foo element */ } html/php: <?php function isrtl($locale) { $rtl_locales = array('ar', 'fa', 'he'); return in_array($locale, $rtl_locales); } ?> <html lang="<?= $locale?>" dir="<?= isrtl($locale) ?
...this is useful to add minor corrective rules to the css that apply only for selected locales.
...And 5 more matches
The building blocks of responsive design - Progressive web apps (PWAs)
to get these sitting side-by-side we have used the following rules: x-card { width: 100%; } x-card:nth-child(1), x-card:nth-child(2) { width: 30%; float: left; padding: 2rem; } x-card:nth-child(3) { width: 40%; float: left; height: 100%; overflow: auto; padding: 2rem; } so we're giving the first two columns a width of 30%, and the third a width of 40%, floating the columns all left.
...this is created using the css rules included at the top of the stylesheet, before any media queries are encountered.
...x-card:nth-child(1) video, x-card:nth-child(2) img, x-card:nth-child(3) { margin-top: 17.5vw; } x-card:nth-child(1) button, x-card:nth-child(2) button { position: absolute; bottom: 0; } x-card:nth-child(2) button:nth-of-type(2) { bottom: 5.9rem; } x-card:nth-child(1) button { font-size: 7vw; } x-card:nth-child(2) button { font-size: 7vw; } the next rules do some sizing on the buttons inside the first two cards, and give all card contents a top margin so that their content won't be lost under the navigation buttons (see below).
...And 5 more matches
Building Menus With Templates - Archive of obsolete content
when creating recursive menus, you will need to use multiple rules, since leaf items will need to be created differently than non-leaf items.
...this will involve at least two rules, although you might use other rules if you had other differences to handle.
... here is an rdf example: <button label="houses in my neighbourhood" type="menu" datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <template> <rule rdf:type="http://www.xulplanet.com/rdf/house"> <menupopup> <menuitem uri="rdf:*" label="rdf:http://www.xulplanet.com/rdf/address"/> </menupopup> </rule> <rule> <menupopup> <menu uri="rdf:*" label="rdf:http://purl.org/dc/elements/1.1/title"/> </menupopup> </rule> </template> </button> this example uses the simple rdf query syntax.
...And 4 more matches
Using the Editor from XUL - Archive of obsolete content
another stack-based class, nsautorules, ensures that text insertion is wrapped with calls to nshtmleditor::startoperation() / endoperation().
... these functions call beforeedit() and afteredit() on the current typing rules.
... now, we initialize a nstextrulesinfo with the information about the string being inserted, and call willdoaction() on the current editing rules.
...And 4 more matches
Making sure your theme works with RTL locales - Archive of obsolete content
all you have to do is add css rules to your theme that test for the value of this attribute, and use that to apply any rtl-specific rules that you may have.
... toolbar[iconsize="large"][mode="icons"] #back-button { -moz-image-region: rect(0px 398px 34px 360px); } toolbar[iconsize="large"][mode="icons"] #back-button[chromedir="rtl"] { -moz-image-region: rect(0px 516px 34px 478px); } this way, if chromedir is "rtl", the second rule will override the first, and the theme will work in rtl.
...for example: /* we want to apply a rtl rule to #c; neither it nor its * parent element #b has a chromedir attribute, but its * grandparent element #a does.
...And 4 more matches
Fixing Incorrectly Sized List Item Markers - Archive of obsolete content
the solution fortunately, there are mozilla-specific css-like rules that can be used to correct both problems.
... the following rule is derived from mozilla's html.css file: *|*:-moz-list-bullet, *|*:-moz-list-number {font-size: 1em;} this rule tells gecko-based browsers to use the computed value of font-size for the marker's parent, which is the list item itself.
... since this rule is not valid css, it will prevent the validation of any stylesheet that contains it.
...And 4 more matches
CSS selectors - Learn web development
a css selector is the first part of a css rule.
... it is a pattern of elements and other terms that tell the browser which html elements should be selected to have the css property values inside the rule applied to them.
... selector lists if you have more than one thing which uses the same css then the individual selectors can be combined into a selector list so that the rule is applied to all of the individual selectors.
...And 4 more matches
Flexbox - Learn web development
try adding the following declaration to your <section> rule: flex-direction: column; you'll see that this puts the items back in a column layout, much like they were before we added any css.
...one way in which you can fix this is to add the following declaration to your <section> rule: flex-wrap: wrap; also, add the following declaration to your <article> rule: flex: 200px; try this now; you'll see that the layout looks much better with this included: we now have multiple rows — as many flexbox children are fitted onto each row as makes sense, and any overflow is moved down to the next line.
... first, add the following rule to the bottom of your css: article { flex: 1; } this is a unitless proportion value that dictates how much of the available space along the main axis each flex item will take up compared to other flex items.
...And 4 more matches
Positioning - Learn web development
</p> now add the following rule to the bottom of your css: .positioned { position: static; background: yellow; } if you now save and refresh, you'll see no difference at all, except for the updated background color of the 2nd paragraph.
...to try this out, add the following declarations to the .positioned rule in your css: top: 30px; left: 30px; note: the values of these properties can take any units you'd logically expect — pixels, mm, rems, %, etc.
...to demonstrate this, add the following declaration to your body rule: position: relative; this should give the following result: <h1>positioning context</h1> <p>i am a basic block level element.
...And 4 more matches
Styling web forms - Learn web development
to make your forms' appearance consistent with the rest of your content, you can add the following rules to your stylesheet: button, input, select, textarea { font-family: inherit; font-size: 100%; } the inherit property value causes the property value to match the computed value of the property of its parent element; inheriting the value of the parent.
...on the right are the same elements, with our above style rule applied.
... this is because each widget has their own rules for border, padding and margin.
...And 4 more matches
The Firefox codebase: CSS Guidelines
using descendant selectors is good practice for performance when possible: for example: .autocomplete-item[selected] > .autocomplete-item-title would be more efficient than .autocomplete-item[selected] .autocomplete-item-title overriding css before overriding any css rules, check whether overriding is really needed.
... it is also good practice to look at whether the rule you are overriding is still needed: maybe the ux spec for the component has changed and that rule can actually be updated or removed.
... when this is the case, don't be afraid to remove or update that rule.
...And 4 more matches
Introduction to XPCOM for the DOM
this is one of the main rules of xpcom.
...the xpidl compiler turns the idl methods and attributes into c++ functions according to the following rules: the methods of the interface keep the same name in c++ .
...the argument list and return type are turned into correct c++ types according to rules not described here.
...And 4 more matches
nsIXULTemplateQueryProcessor
method overview void addbinding(in nsidomnode arulenode, in nsiatom avar, in nsiatom aref, in astring aexpr); print32 compareresults(in nsixultemplateresult aleft, in nsixultemplateresult aright, in nsiatom avar, in unsigned long asorthints); nsisupports compilequery(in nsixultemplatebuilder abuilder, in nsidomnode aquery, in nsiatom arefvariable, in nsiatom amembervariable); void done(); nsisimpleenumerator generateresults(in nsisupports ...
...atasources, in nsidomnode arootnode, in boolean aistrusted, in nsixultemplatebuilder abuilder, out boolean ashoulddelaybuilding); void initializeforbuilding(in nsisupports adatasource, in nsixultemplatebuilder abuilder, in nsidomnode arootnode); nsixultemplateresult translateref(in nsisupports adatasource, in astring arefstring); methods addbinding() add a variable binding for a particular rule.
...any bindings that were added should be applied to each result when the result's rulematched method is called, since the bindings are different for each rule.
...And 4 more matches
CSSStyleDeclaration.setProperty() - Web APIs
we know that the rule we want to alter to do this is contained inside the second stylesheet applied to the page, so we grab a reference to it using document.stylesheets[1].
... we then loop through the different rules contained inside the stylesheet, which are contained in the array found at stylesheet.cssrules; for each one, we check whether its cssstylerule.selectortext property is equal to the selector .box p, which indicates it is the one we want.
... if so, we store a reference to this cssstylerule object in a variable.
...And 4 more matches
@import - CSS: Cascading Style Sheets
WebCSS@import
the @import css at-rule is used to import style rules from other style sheets.
... list-of-media-queries is a comma-separated list of media queries conditioning the application of the css rules defined in the linked url.
... description imported rules must precede all other types of rules, except @charset rules; as it is not a nested statement, @import cannot be used inside conditional group at-rules.
...And 4 more matches
@media - CSS: Cascading Style Sheets
WebCSS@media
the @media css at-rule can be used to apply part of a style sheet based on the result of one or more media queries.
... note: in javascript, the rules created using @media can be accessed with the cssmediarule css object model interface.
... syntax the @media at-rule may be placed at the top level of your code or nested inside any other conditional group at-rule.
...And 4 more matches
Using CSS animations - CSS: Cascading Style Sheets
this does not configure the actual appearance of the animation, which is done using the @keyframes at-rule as described in defining the animation sequence using keyframes below.
... the sub-properties of the animation property are: animation-name specifies the name of the @keyframes at-rule describing the animation’s keyframes.
...this is done by establishing two or more keyframes using the @keyframes at-rule.
...And 4 more matches
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
in addition to the ability to place items accurately onto a created grid, the css grid layout specification contains rules that control what happens when you create a grid and do not place some or all of the child items.
... background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-gap: 10px; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> default rules for auto-placement as you can see with the above example, if you create a grid all child items will lay themselves out one into each grid cell.
...this can be helpful, if you have a document order that reflects the order in which items sit on the grid you may not need to write css rules to place absolutely everything.
...And 4 more matches
<basic-shape> - CSS: Cascading Style Sheets
polygon() polygon( [<fill-rule>,]?
... [<shape-arg> <shape-arg>]# ) <fill-rule> represents the filling rule used to determine the interior of the polygon.
... path() path( [<fill-rule>,]?
...And 4 more matches
shape-outside - CSS: Cascading Style Sheets
the shape follows the normal border radius shaping rules for the outside of the border.
...the shape follows the normal border radius shaping rules for the inside of the border.
... interpolation when animating between one <basic-shape> and a second, the rules below are applied.
...And 4 more matches
Standard metadata names - HTML: Hypertext Markup Language
WebHTMLElementmetaname
browser settings can ignore this rule and ios10+ ignores it by default.
...browser settings can ignore this rule and ios10+ ignores it by default.
...browser settings can ignore this rule, and ios10+ ignores it by default.
...And 4 more matches
Populating the page: how browsers work - Web Performance
tcp slow start / 14kb rule the first response packet will be 14kb.
... if you’ve ever heard of the 14kb rule for initial page load, tcp slow start is the reason why the initial response is 14kb, and why web performance optimization calls for focusing optimizations with this initial 14kb response in mind.
...the browser converts the css rules into a map of styles it can understand and work with.
...And 4 more matches
page-mod - Archive of obsolete content
for example, the following add-on displays an alert whenever the user visits any page hosted at "mozilla.org": var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscript: 'window.alert("page matches ruleset");' }); you can modify the document in your script: var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscript: 'document.body.innerhtml = ' + ' "<h1>page matches ruleset</h1>";' }); you can supply the content script(s) in one of two ways: as a string literal, or an array of string literals, assigned to the contentscript option,...
... you can specify a url exactly: var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "http://www.iana.org/domains/example/", contentscript: 'window.alert("page matches ruleset");' }); you can specify a number of wildcard forms, for example: var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscript: 'window.alert("matched!");' }); you can specify a set of urls using a regular expression.
... name:contentstyle type: string,array use this option to load one or more stylesheet rules into the targeted documents.
...And 3 more matches
stylesheet/style - Archive of obsolete content
experimental modify styles using stylesheet files or css rules.
... globals constructors style(options) the style constructor creates an object that represents style modifications via stylesheet file(s) or/and css rules.
... stylesheet file url(s) are verified to be local to an add-on, while css rules are verified to be a string or array of strings.
...And 3 more matches
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
topsrcdir = @top_srcdir@ srcdir = @srcdir@ vpath = @srcdir@ include $(depth)/config/autoconf.mk module = myextension dirs = public src xpi_name = myextension install_extension_id = myextension@mycompany.com xpi_pkgname = myextension dist_files = install.rdf include $(topsrcdir)/config/rules.mk a detailed description of the make process, describing the key features of this makefile, can be found here.
...topsrcdir = @top_srcdir@ srcdir = @srcdir@ vpath = @srcdir@ include $(depth)/config/autoconf.mk module = myextension xpidl_module = myextension xpi_name = myextension exports = \ myheader.h \ $(null) xpidlsrcs = \ myifirstcomponent.idl \ myisecondcomponent.idl \ $(null) include $(topsrcdir)/config/rules.mk xpidl_module is the name of the generated xpt file that contains type information about your idl interfaces.
...topsrcdir = @top_srcdir@ srcdir = @srcdir@ vpath = @srcdir@ include $(depth)/config/autoconf.mk is_component = 1 module = myextension library_name = myextension use_static_libs = 1 xpi_name = myextension cppsrcs = \ myfirstcomponent.cpp \ mysecondcomponent.cpp \ myextension.cpp \ $(null) include $(topsrcdir)/config/rules.mk extra_dso_ldopts += \ $(moz_component_libs) \ $(nspr_libs) \ $(null) in this example, the first two files contain the implementation of the extension's two components.
...And 3 more matches
Binding Attachment and Detachment - Archive of obsolete content
input[type="checkbox"] { -moz-binding: url("http://www.mozilla.org/xbl/htmlbindings.xml#checkbox"); } bindings attached through css will only remain on the bound element as long as the element continues to match the style rule.
... no bindings will be attached to elements that match the style rule, but are inside an element that has style display:none set.
...any bindings attached to an element will remain on the element until the element is destroyed or the corresponding style rule is removed.
...And 3 more matches
RDF Query Syntax - Archive of obsolete content
<vbox datasources="http://www.xulplanet.com/ds/sample.rdf" ref="http://www.xulplanet.com/rdf/a"> <template> <query> <content uri="?start"/> <triple subject="?start" predicate="http://www.xulplanet.com/rdf/relateditem" object="?relateditem"/> </query> <rule> ...
... </rule> </template> </vbox> this query has two statements, each specified with a different tag.
... the template won't generate anything yet since we still need to fill in the content to be generated which goes in the missing part inside the rule.
...And 3 more matches
Floats - Learn web development
to float the text around it add the float and margin-right properties to the .box rule: .box { float: left; margin-right: 15px; width: 150px; height: 100px; border-radius: 5px; background-color: rgb(207,232,220); padding: 1em; } now if you save and refresh you'll see something like the following: float example 1 <h1>simple float example</h1> <div class="box">float</div> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...try changing the float value to right and replace margin-right with margin-left in the last ruleset to see what the result is.
... add a class of special to the first paragraph of text, the one immediately following the floated box, then in your css add the following rules.
...And 3 more matches
How Mozilla's build system works
makefile basics makefiles can be quite complicated, but mozilla provides a number of built-in rules that should enable most makefiles to be simpler.
... include $(topsrcdir)/config/rules.mk # ...
... additional rules go here ...
...And 3 more matches
NSS API Guidelines
these rules are here to help us all immediately achieve more consistent and usable code, but some existing code won't follow all these rules.
... utility for any layer lib/util base64.h, ciferfam.h, nssb64.h, nssb64t.h, nsslocks.h, nssrwlk.h, nssrwlkt.h, portreg.h, pqgutil.h, secasn1.h, secasn1t.h, seccomon.h, secder.h, secdert.h, secdig.h, secdigt.h, secitem.h, secoid.h, secoidt.h, secport.h, secrng.h, secrngt.h, secerr.h, watcomfx.h naming conventions this section describes the rules that (ideally) should be followed for naming and identifying new files, functions, and data types.
... first some general rules.
...And 3 more matches
Split object
to enforce this rule: if this would evaluate to an inner object, it evaluates to the corresponding outer object instead.
...again, spidermonkey enforces a slightly stronger rule: outer objects may never appear in a scope chain at all, except when put there by an explicit c-level jsapi call (to js_setparent or equivalent).
... (several objects, such as window.location and window.navigator, are intentionally parented to the outer window object using such apis.) to enforce this rule: apis that allow the caller to pass a scope object always check that object first and fail if any outer objects are on its scope chain.
...And 3 more matches
nsIXULTemplateResult
method overview astring getbindingfor(in nsiatom avar); nsisupports getbindingobjectfor(in nsiatom avar); void hasbeenremoved(); void rulematched(in nsisupports aquery, in nsidomnode arulenode); attributes attribute type description id astring id of the result.
...rulematched() indicate that a particular rule of a query has matched and that output will be generated for it.
... both the query as compiled by the query processor's nsixultemplatequeryprocessor.compilequery() method and the xul <rule> element are supplied.
...And 3 more matches
Debugger - Firefox Developer Tools
a cross-compartment wrapper of an object; we apply the prior rules to the wrapped object.
... a debugger.object instance belonging to this debugger instance; we apply the prior rules to the referent.
...(note that each rule is only applied once in the process of resolving a givenglobal argument.
...And 3 more matches
Style Editor - Firefox Developer Tools
the media sidebar the style editor displays a sidebar on the right-hand side whenever the current sheet contains any @media rules.
... the sidebar lists the rules and provides a link to the line of the sheet where the rule is defined.
... click an item to jump to that rule in the sheet.
...And 3 more matches
CanvasRenderingContext2D.clip() - Web APIs
syntax void ctx.clip([fillrule]); void ctx.clip(path [, fillrule]); parameters fillrule the algorithm by which to determine if a point is inside or outside the clipping region.
... possible values: "nonzero": the non-zero winding rule.
... default rule.
...And 3 more matches
CanvasRenderingContext2D.fill() - Web APIs
syntax void ctx.fill([fillrule]); void ctx.fill(path [, fillrule]); parameters fillrule the algorithm by which to determine if a point is inside or outside the filling region.
... possible values: "nonzero": the non-zero winding rule.
... default rule.
...And 3 more matches
@charset - CSS: Cascading Style Sheets
WebCSS@charset
the @charset css at-rule specifies the character encoding used in the style sheet.
... it must be the first element in the style sheet and not be preceded by any character; as it is not a nested statement, it cannot be used inside conditional group at-rules.
... if several @charset at-rules are defined, only the first one is used, and it cannot be used inside a style attribute on an html element or inside the <style> element where the character set of the html page is relevant.
...And 3 more matches
@document - CSS: Cascading Style Sheets
WebCSS@document
the @document css at-rule restricts the style rules contained within it based on the url of the document.
... @document url("https://www.example.com/") { h1 { color: green; } } syntax an @document rule can specify one or more matching functions.
... if any of the functions apply to a given url, the rule will take effect on that url.
...And 3 more matches
Critical rendering path - Web Performance
css is render blocking because rules can be overwritten, so the content can't be rendered until the cssom is complete.
... css has its own set of rules for identifying valid tokens.
...css rules cascade down.
...And 3 more matches
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
42 clip-rule svg, svg attribute the clip-rule attribute only applies to graphics elements that are contained within a <clippath> element.
... the clip-rule attribute basically works as the fill-rule attribute, except that it applies to <clippath> definitions.
... 73 fill-rule svg, svg attribute the fill-rule attribute is a presentation attribute defining the algorithm to use to determine the inside part of a shape.
...And 3 more matches
Introduction to XUL - Archive of obsolete content
this will change: tags and attributes will, as a rule, always be lower case as suggested in the xhtml working draft.
...(for standards purposes, we will probably need to change the the mime type to something like "text/x-xul".) these files are processed using the same parser as "text/xml" files (and therefore subject to xml syntax rules, as they should be).
...rare exceptions to this rule are bugs.
...And 2 more matches
RDF in Mozilla FAQ - Archive of obsolete content
you may use any kind of tag (including html, or arbitrary xml) in the <action> section of a <rule>.
...rather than writing three pieces of js (or c++) code to construct the dom trees each for <menubutton>, <menu>, and <tree> content models, you write three compact sets of rules for each content model.
...(note how this requirement complicates the task of building a content model!) the xul template builder uses the rules to automatically keep all content models in sync with your changes.
...And 2 more matches
Beginner's guide to media queries - Learn web development
previous overview: css layout next the css media query gives you a way to apply css only when the browser and device environment matches a rule that you specify, for example "viewport is wider than 480 pixels".
... media query basics the simplest media query syntax looks like this: @media media-type and (media-feature-rule) { /* css rules go here */ } it consists of: a media type, which tells the browser what kind of media this code is for (e.g.
... a media expression, which is a rule, or test that must be passed for the contained css to be applied.
...And 2 more matches
Index - Learn web development
we have over 25 years' experience and we'll give you some common rules of thumb to help you design your site.
...in this article we give general accessibility principles and explain a few rules.
... 115 cascade and inheritance beginner, css, cascade, inheritance, learn, rules, source order, specificity the aim of this lesson is to develop your understanding of some of the most fundamental concepts of css — the cascade, specificity, and inheritance — which control how css is applied to html and how conflicts are resolved.
...And 2 more matches
Introducing a complete toolchain - Learn web development
using both is recommended: for projects you intend to share, you should always include eslint as a local dependency so that anyone making their own copy can follow the rules you've applied to the project.
...however, bear in mind that if you want to refine and enforce a rule about how your code looks (or validates), it's very likely that it can be done with the right eslint configuration.
... next up, we’ll configure eslint — create another file in the root of your will-it-miss directory called .eslintrc.json, and give it the following contents: { "env": { "es6": true, "browser": true }, "extends": "eslint:recommended", "parseroptions": { "ecmaversion": 6, "sourcetype": "module" }, "rules": { "no-console": 0 } } the above eslint configuration says that we want to use the "recommended" eslint settings, that we're going to allow usage of es6 features (such as map() or set()), that we can use module import statements, and that using console.log() is allowed.
...And 2 more matches
Adding a new CSS property
(which set the property is in is given in the specification, which says "inherited: yes" or "inherited: no" in the property's definition.) also note that some of the style structs intentionally contain only properties set/reset by a particular common shorthand property; this improves the effectiveness of some of the performance and memory optimizations done with the rule tree, and thus we should avoid adding a property not reset by that shorthand to such a struct.
... you then need to add code to nsrulenode::compute*data (where the * is for the style struct) to transform a specified value of the property into a computed value of the property.
... for examples of how to write this computation code, see other examples in nsrulenode.cpp.
...And 2 more matches
Invariants
lifetime invariants in some places, pointers to jsobjects and jsstrings must refer to live heap objects, but this is not a hard fast rule, especially for strings.
... a general rule about the state of all threads at a given time: either exactly one thread is "in gc" and no threads are in requests; or no thread is doing gc, in which case any number of threads may be in requests; or the gc lock is held.
...js_setwatchpoint violates this rule.) whether a property is locked, and which one, is static information for almost every line of code.
...And 2 more matches
Building the WebLock UI
weblock.css provides style rules for both of the xul files.
... <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <dialog id="weblock_ui" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="web lock manager" persist="screenx screeny" screenx="24" screeny="24"> </dialog> note that this part of the xul file also contains a stylesheet declaration, which imports css rules and applies them to particular parts of the interface.
... weblock.css the following style rules are defined in weblock.css, a css file that is loaded by the overlay and applied to the icon in the browser that reflects the current status of the web lock and provides access to the web lock manager dialog.
...And 2 more matches
Introduction to DOM Inspector - Firefox Developer Tools
in order to find out what the actual name of the file is being used to provide the search go icon, you can select the css rules viewer from this menu and see the various selectors and rules that have been applied.
... the rule that applies the search icon to the element uses a class simple selector and uses a list-style-image property to point to a file in the current theme.
... the css rules viewer shows the css rules that are applied to the node.
...And 2 more matches
Index - Firefox Developer Tools
58 edit css filters css, devtools, filters, page inspector, tools css filter properties in the rules view have a circular gray and white swatch next to them: 59 edit shape paths in css css, devtools, page inspector, rules view, tools, highlighter, shapes the shape path editor is a tool that helps you see and edit shapes created using clip-path and also the css shape-outside property and <basic-shape> values.
... 64 examine and edit the box model guide, tools with the select element button pressed, if you hover over an element in the page, the box model for the element is shown overlaid on the page: 65 inspect and select colors guide, inspector, tools in the css pane's rules view, if a rule contains a color value, you'll see a sample of the color next to the value: 66 open the inspector guide, inspector, tools there are two main ways to open the inspector: 67 reposition elements in the page starting in firefox 48 you can move absolutely positioned elements by dragging them around the page.
... 72 view background images in the rules view, you can see a preview of images specified using background-image.
...And 2 more matches
Page inspector 3-pane mode - Firefox Developer Tools
the css rules in the middle in their own separate pane, rather than as a tab.
... note: at narrower browser window widths, the tabs appear below the css rules pane.
... having the css rules in their own pane is very useful because it allows you to not only inspect your html and edit the css applied to it, but also see the effect this has on css features such as computed styles and grids in real time.
...And 2 more matches
Using dynamic styling information - Web APIs
however, there are cases where actually obtaining or manipulating the rules can be useful (whether for whole stylesheets or individual elements), and that is described in further detail below.
...those interfaces contain members like insertrule, selectortext, and parentstylesheet for accessing and manipulating the individual style rules that make up a css stylesheet.
... modify a stylesheet rule with cssom <html> <head> <title>modifying a stylesheet rule with cssom</title> <style type="text/css"> body { background-color: red; } </style> <script type="text/javascript"> var stylesheet = document.stylesheets[0]; stylesheet.cssrules[0].style.backgroundcolor="blue"; </script> </head> <body> the stylesheet declaration for the body's background color is modified via javascript.
...And 2 more matches
CanvasRenderingContext2D.isPointInPath() - Web APIs
syntax ctx.ispointinpath(x, y [, fillrule]); ctx.ispointinpath(path, x, y [, fillrule]); parameters x the x-axis coordinate of the point to check, unaffected by the current transformation of the context.
... fillrule the algorithm by which to determine if a point is inside or outside the path.
... possible values: "nonzero": the non-zero winding rule.
...And 2 more matches
HTMLHRElement - Web APIs
htmlhrelement.align is a domstring, an enumerated attribute indicating alignment of the rule with respect to the surrounding context.
... htmlhrelement.color is a domstring representing the name of the color of the rule.
... htmlhrelement.noshade is a boolean that sets the rule to have no shading.
...And 2 more matches
system - CSS: Cascading Style Sheets
an additional descriptor called additive-symbols must be specified with at least one additive tuple, or else the counter style rule will not be valid.
...if a counter style rule is using the extends system, any unspecified descriptors, and their values will be taken from the extended counter style specified.
... it must not contain a symbols or additive-symbols descriptor, or else the counter style rule is invalid.
...And 2 more matches
@counter-style - CSS: Cascading Style Sheets
the @counter-style css at-rule lets you define counter styles that are not part of the predefined set of styles.
... a @counter-style rule defines how to convert a counter value into a string representation.
...the @counter-style at-rule addresses this shortcoming in an open-ended manner, by allowing authors to define their own counter styles when the pre-defined styles aren't fitting their needs.
...And 2 more matches
src - CSS: Cascading Style Sheets
WebCSS@font-facesrc
the src css descriptor of the @font-face rule specifies the resource containing font data.
... it is required for the @font-face rule to be valid.
... as with other urls in css, the url may be relative, in which case it is resolved relative to the location of the style sheet containing the @font-face rule.
...And 2 more matches
Introduction to formatting contexts - CSS: Cascading Style Sheets
a block formatting context (bfc) will lay child elements out according to block layout rules, a flex formatting context will lay its children out as flex items, etc.
... each formatting context has specific rules about how layout behaves when in that context.
... block formatting contexts the outermost element in a document that uses block layout rules establishes the first, or initial block formatting context.
...And 2 more matches
Understanding CSS z-index - CSS: Cascading Style Sheets
(from css 2.1 section 9.9.1 - layered presentation) this means that css style rules allow you to position boxes on layers in addition to the normal rendering layer (layer 0).
...this is due to complex stacking rules.
... in fact a dedicated section has been reserved in the css specification css-2.1 appendix e to explain these rules better.
...And 2 more matches
Using media queries - CSS: Cascading Style Sheets
media queries are used for the following: to conditionally apply styles with the css @media and @import at-rules.
...you can also combine multiple media queries into a single rule by separating them with commas.
... , (comma) commas are used to combine multiple media queries into a single rule.
...And 2 more matches
Shorthand properties - CSS: Cascading Style Sheets
therefore: background-color: red; background: url(images/bg.gif) no-repeat left top; will not set the color of the background to red but to background-color's default, transparent, as the second rule has precedence.
... margin: 10px 5px 10px 5px; margin shorthand rules for one, two, three and four value declarations are: when one value is specified, it applies the same margin to all four sides.
...if you remove the rule how does it change the color of the link?
...And 2 more matches
Modifying Web Pages Based on URL - Archive of obsolete content
tentscript option and url pattern is given as include option is as follows: // import the page-mod api var pagemod = require("sdk/page-mod"); // create a page-mod // it will run a script whenever a ".org" url is loaded // the script replaces the page contents with a message pagemod.pagemod({ include: "*.org", contentscript: 'document.body.innerhtml = ' + ' "<h1>page matches ruleset</h1>";' }); do as follows: create a new directory and navigate to it.
... $("body").html("<h1>page matches ruleset</h1>"); then download jquery to add-on's data directory, and load the script and jquery together (making sure to load jquery first).
.../ import the page-mod api var pagemod = require("sdk/page-mod"); // import the self api var self = require("sdk/self"); // create a page-mod // it will run a script whenever a ".org" url is loaded // the script replaces the page contents with a message pagemod.pagemod({ include: "*.org", contentscriptfile: self.data.url("jquery-1.7.min.js"), contentscript: '$("body").html("<h1>page matches ruleset</h1>");' }); note, though, that you can't load a script from a web site.
...elf api var self = require("sdk/self"); // create a page-mod // it will run a script whenever a ".org" url is loaded // the script replaces the page contents with a message pagemod.pagemod({ include: "*.org", contentscriptfile: self.data.url("my-script.js"), // send the content script a message inside onattach onattach: function(worker) { worker.port.emit("replacepage", "page matches ruleset"); } }); the replacepage message isn't a built-in message: it's a message defined by the add-on in the port.emit() call.
Localization - Archive of obsolete content
different languages have different rules for the formation of plurals.
... unicode cldr plural forms the unicode cldr project defines a scheme for describing a particular language's plural rules.
...ms, which can be described by mapping "1" to "one" and "everything else" to "other": one → n is 1; other → everything else russian uses four forms, that can be described as follows: one → n mod 10 is 1 and n mod 100 is not 11; few → n mod 10 in 2..4 and n mod 100 not in 12..14; many → n mod 10 is 0 or n mod 10 in 5..9 or n mod 100 in 11..14; other → everything else plural rules for all languages can be found in the cldr language plural rules page (although this table is out of date compared to the cldr xml source).
... primarily, this is important because different languages have different rules for word order.
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
ulschoolhello-toolbarbutton { list-style-image: url("chrome://xulschoolhello-os/skin/toolbar-large.png"); } #xulschoolhello-hello-world-button { -moz-image-region: rect(0px, 24px, 24px, 0px); } toolbar[iconsize="small"] #xulschoolhello-hello-world-button { list-style-image: url("chrome://xulschoolhello-os/skin/toolbar.png"); -moz-image-region: rect(0px, 16px, 16px, 0px); } several css rules apply by default to all toolbar buttons.
...if for some reason you want to override these styles (not recommended), you'll need the following rule: -moz-appearance: none; -moz-appearance can be used in many cases where you want to strip the native look out of an element.
... this will save you a lot of time trying to remove all the css rules that give the buttons a native look.
... you'll probably still need to override a couple other css rules to get a completely plain look.
iscontainer - Archive of obsolete content
« xul reference home iscontainer type: boolean indicates whether rules match based on containment.
... if not specified, the rule may match regardless of whether a node is a container or not.
... true: the rule will only match nodes that are marked as containers.
... false: the rule will only match nodes that are not marked as containers.
isempty - Archive of obsolete content
« xul reference home isempty type: boolean indicates whether rules match based on emptyness.
... if not specified, the rule may match regardless of whether a node has children or not.
... true: the rule will only match nodes that contain no child elements.
... false: the rule will only match nodes that contain one or more child elements.
How to implement a custom XUL query processor component - Archive of obsolete content
from the beginning of the name var name = avar.tostring().slice(1); return this._data[name]; }, // return an object instead of a string for convenient comparison purposes // or null to say just use string value getbindingobjectfor: function(avar) { return null; }, // called when a rule matches this item.
... rulematched: function(aquery, arulenode) { }, // the output for a result has been removed and the result is no longer being used by the builder hasbeenremoved: function() { } }; // basic wrapper for nsisimpleenumerator function templateresultset(aarrayofdata) { this._index = 0; this._array = aarrayofdata; } templateresultset.prototype = { queryinterface: xpcomutils.generateqi([components.interfaces.nsisimpleenumerator]), hasmoreelements: function() { return this._index < this._array.length; }, getnext: function() { return new templateresult(this._array[this._index++]); } }; // the query processor class - implements nsixultemplatequeryprocessor function templatequeryprocessor() { // our basic list of data this._data = [ {name: "mark", age...
... // eventually we should read the <query> to create filters return this._data; }, generateresults: function(adatasource, aref, aquery) { // preform any query and pass the data to the result set return new templateresultset(this._data); }, addbinding: function(arulenode, avar, aref, aexpr) { // add a variable binding for a particular rule, which we aren't using yet }, translateref: function(adatasource, arefstring) { // if we return null, everything stops return new templateresult(null); }, compareresults: function(aleft, aright, avar) { // -1 less, 0 ==, +1 greater var leftvalue = aleft.getbindingfor(avar); var rightvalue =...
... we do not make use of any <query/> or <rule/> elements in the xul template block.
Bindings - Archive of obsolete content
this tag doesn't go in the query block but instead inside a rule element.
... </query> <rule> <binding subject="?photo" predicate="http://purl.org/dc/elements/1.1/description" object="?description"/> <action> ...
... </action> </rule> </template> the description triple has been changed to a binding element, but the attributes are the same.
...note that when bindings are used, the bindings and the action must be enclosed inside a rule element.
Building Hierarchical Trees - Archive of obsolete content
three results will be generated from a simple rule with no extra conditions.
...ple for the streets datasource: <tree flex="1" datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood" flags="dont-build-content" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <treecols> <treecol id="address" primary="true" label="address" flex="1"/> <treecol id="floors" label="floors" flex="1"/> </treecols> <template> <rule rdf:type="http://www.xulplanet.com/rdf/house"> <treechildren> <treeitem uri="rdf:*"> <treerow> <treecell label="rdf:http://www.xulplanet.com/rdf/address"/> <treecell label="rdf:http://www.xulplanet.com/rdf/floors"/> </treerow> </treeitem> </treechildren> </rule> <rule> <treechildren> <treeitem uri="rdf:*...
..."> <treerow> <treecell label="rdf:http://purl.org/dc/elements/1.1/title"/> </treerow> </treeitem> </treechildren> </rule> </template> </tree> the first rule is for the houses as indicated by the rule's condition and the second rule is for the streets.
...in this example, we only need to use one rule.
XML - Archive of obsolete content
xul syntax & rules xul is a standards-based interface definition language.
...you must be very careful about your syntax, and in particular about these four cardinal rules of xul: all events and attributes must be written in lowercase.
...xul is based upon xml, so it inherits a lot of the rules and syntax described above from this "meta-language," as you will see.
...where in html the elements are used to describe the look of text, in xul the elements are used to define the elements of an interface and some rules for putting them together.
template - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] used to declare a template for rule-based construction of elements.
...for more information see the rule element.
...if not specified, the variable specified in the uri attribute of the content tag in the template's first rule is used.
...if not specified, the variable specified in the uri attribute in the action body of the template's first rule is used.
Theme changes in Firefox 4 - Archive of obsolete content
css property on the toolbar element value forced on the iconsize attribute counter-reset: largeicons; large counter-reset: smallicons; small for toolbars in the upper part of the window, the counter-reset property can be set using a css rule that is applied depending on the user preference in the toolbar customization palette.
... to do this, use a css rule that depends on the iconsize attribute on the #navigator-toolbox element.
... note: a rule that depends on the user preference cannot be applied to the add-on bar because it is not a child of the #navigator-toolbox element.
...thus, it includes this rule in browser.css: #nav-bar { counter-reset: smallicons; } to use large icons for add-on buttons in the bookmarks toolbar when the related user preference is set: #navigator-toolbox[iconsize="large"] > #personaltoolbar { counter-reset: largeicons; } to use large icons everywhere, including the menu bar, regardless of the user preference: #navigator-toolbox > toolbar, #addon-bar { counter-reset: largeicons; } creating a theme that works for firefox 4 on mac os x create a new directory (for example, my_theme).
Browser Detection and Cross Browser Support - Archive of obsolete content
</script> </body> </html> using netscape navigator 4's css limitations it is possible to use netscape navigator 4's limitations for css support to automatically exclude certain css rules from ever being seen by navigator 4.
...this technique can be used to provide basic common css rules for all browsers (including navigator 4) while providing more advanced rules in a external css file for more modern css compliant browsers.
... <style type="text/css"> /* navigator 4 css rules */ </style> <style type="text/css"> /* advanced css rules ignored by navigator 4 */ @import "advanced.css"; </style> a similar technique is available for hiding css rules from navigator 4 using the fact that navigator 4 will ignore css rules after an occurence of /*/*/ in a stylesheet.
... <style type="text/css"> /* navigator 4 css rules */ /*/*/ /* advanced css rules ignored by navigator 4 */ </style> devedge uses this technique to hide advanced css from navigator 4.
Issues Arising From Arbitrary-Element hover - Archive of obsolete content
for example: :hover {color: red;} this is equivalent to the css2 rule: *:hover {color: red;} ..which translates as "any element that is being hovered should have its foreground colored red." thus, hovering over paragraphs, tables, headings, and any other element in a document will cause text to become red.
...however, rules of this type are usually seen in conjunction with markup like this: <td class="nav"> <a href="one.html" class="nav">one</a> | <a href="two.html" class="nav">two</a> | <a href="thr.html" class="nav">three</a> | <a href="fou.html" class="nav">four</a> </td> because the enclosing table cell has a class of nav, the vertical-bar characters will turn red when the user moves the mouse pointer anywhere within the table cell.
...consider the effects of the following rule: a:hover {color: red;} in a document with an unclosed named anchor, any text that follows the anchor's open tag will be colored red (unless another css rule intervenes).
...it does mean, of course, that the selector a:link:hover will only apply to unvisited links, so authors who want the same hover style to apply to both visited and unvisited links should group the two selectors into a single rule.
CSS - MDN Web Docs Glossary: Definitions of Web-related terms
a css rule is a set of properties associated with a selector.
... here is an example that makes every html paragraph yellow against a black background: /* the selector "p" indicates that all paragraphs in the document will be affected by that rule */ p { /* the "color" property defines the text color, in this case yellow.
...*/ background-color: black } "cascading" refers to the rules that govern how selectors are prioritized to change a page's appearance.
... this is a very important feature, since a complex website can have thousands of css rules.
Styling lists - Learn web development
github, and find the source code too.) the css used for the text styling and spacing is as follows: /* general styles */ html { font-family: helvetica, arial, sans-serif; font-size: 10px; } h2 { font-size: 2rem; } ul,ol,dl,p { font-size: 1.5rem; } li, p { line-height: 1.5; } /* description list styles */ dd, dt { line-height: 1.5; } dt { font-weight: bold; } the first rule sets a sitewide font and a baseline font size of 10px.
... rules 2 and 3 set relative font sizes for the headings, different list types (the children of the list elements inherit these), and paragraphs.
... rule 4 sets the same line-height on the paragraphs and list items — so the paragraphs and each individual list item will have the same spacing between lines.
... rules 5 and 6 apply to the description list — we set the same line-height on the description list terms and descriptions as we did with the paragraphs and list items.
What are browser developer tools? - Learn web development
exploring the css editor by default, the css editor displays the css rules applied to the currently selected element: these features are especially handy: the rules applied to the current element are shown in order of most-to-least-specific.
... next to each rule is the file name and line number the rule is defined in.
... clicking that rule causes the dev tools to jump to show it in its own view, where it can generally be edited and saved.
... you can also click the closing curly brace of any rule to bring up a text box on a new line, where you can write a completely new declaration for your page.
Implementing feature detection - Learn web development
@supports in recent times, css has had its own native feature detection mechanism introduced — the @supports at-rule.
...if you look at the latter, you'll see a couple of @supports blocks, for example: @supports (flex-flow: row) and (flex: 1) { main { display: flex; } main div { padding-right: 4%; flex: 1; } main div:last-child { padding-right: 0; } } this at-rule block applies the css rule within only if the current browser supports both the flex-flow: row and flex: 1 declarations.
... @supports also has or and not logic available — the other block applies the float layout if the flexbox properties are not available: @supports not (flex-flow: row) and (flex: 1) { /* rules in here */ } this may look a lot more convenient than the previous example — we can do all of our feature detection in css, no javascript required, and we can handle all the logic in a single css file, cutting down on http requests.
...so here we're applying the top set of rules only to browsers that do support flexbox, and the bottom set of rules only to browsers that don't (no-flexbox).
What to do and what not to do in Bugzilla
resolving bugs some general rules: when you resolve a bug, cc yourself so that you are informed when new facts come up.
... the conditions for not resolving a bug always overrule the conditions for resolving a bug.
... there are no clear rules for verifying worksforme.
...the exceptions to this rule are platform-specific or compiler-specific bugs.
Debugging Frame Reflow
create a text file (for instance reflow_rules.txt).
... enter this line in the text file * 1 this should look like: point the gecko_display_reflow_rules_file environment variable to the path of the reflow_rules.txt file.
...for instance adding text 0 to the rules in reflow_rules.txt would hide the text entries from the reflow.
...gecko_display_reflow_indent_undisplayed_frames setting this option via set gecko_display_reflow_indent_undisplayed_frames = 1 will cause an advance of the indent even for frames which are blocked via the reflow rules file.
Makefile - variables
simple_programs suppress_default_rules inhibit processing of makefile tier targets/directory processing will be unordered.
... sdk_headers makefile generation description no_makefile_rule [pending] inhibit makefile.in deps that would allow $obj/makefile to be generated.
... no_submakefile_rule [pending/redundant?] inhibit makefile generation within subdirectories.
... dist_chrome_files exists in rules.mk but not referenced by mozilla-central.
SVG Guidelines
these rules are based on some real examples seen in mozilla's code.
...ects specification) id (id on root element has no effect) xmlns:xlink attribute when there are no xlink:href attributes used throughout the file other unused xml namespace definitions xml:space when there is no text used in the file other empty tags, this may be obvious, but those are sometimes found in svgs unreferenced ids (usually on gradient stops, but also on shapes or paths) clip-rule attribute when the element is not a descendant of a <clippath> fill-rule attribute when the element is a descendant of a <clippath> unreferenced/unused clip paths, masks or defs (example) styling basics privilege short lowercase hex for colors don't use excessive precision for numeric values (usually comes from illustrator) use descriptive ids avoid inline styles and use class names o...
...you can avoid this by doing basic algebra, for example: <g transform="translate(-62, -310)"><shape transform="translate(60, 308)"/></g> can be cut down to: <shape transform="translate(-2,-2)"/> because: -62+60 = -310+308 = -2 performance tips these rules are optional, but they help speeding up the svg.
...note, however that some of the rules stated above can be hard to detect with automated tools since they require too much context-awareness.
gettext
the string definition in the messages.po file will look like this: #: file.php:3 #, php-format msgid "%d user likes this." msgid_plural "%d users like this." msgstr[0] "" msgstr[1] "" depending on the localizer's target language and its rules for creating plural forms, there might be another field for translation, e.g.
...to determine which form to return, gettext uses a plural rule, which should be declared in the po file header.
... for example, for english, the plural rule is of the following form: plural-forms: nplurals=2; plural=n != 1; the first part defines the number of different plural forms (2).
...in the rule above, if n equals 1, the expression is evaluated to false, or 0, so msgstr[0] will be used.
Mozilla Web Developer FAQ
if the table cells that contain only an image are marked with <td class="imgcell">, the required css rule is: .imgcell img, .imgcell a { display: block; } longer explanation… why are there still gaps even between text rows in tables when the layout engine is in the standards mode or in the almost standards mode?
...the css error handling rules require erroneous parts to be ignored rather than fixed by guessing.
...the property is font-family and @font-face is an at-rule.
... css works according to the xml+css rules.
Bytecode Descriptions
sourcestart and sourceend follow the same rules as for jsop::classconstructor.
...rules: forwardoffset must be positive and must target a jsop::jumptarget instruction followed by jsop::finally.
...fine print for environment chain instructions the following rules for jsop::{push,pop}lexicalenv also apply to jsop::pushvarenv and jsop::{enter,leave}with.
... the weird scoping rules for functions with default parameter expressions, as specified in functiondeclarationinstantiation step 28 ("note: a separate environment record is needed...").
XUL Accessibility
at api general rules this section holds some rules applied to generating accessible name and description.
...nd tooltiptext attribute append the accessible value searching specific element in neighbour of the element search inside the element subtree go up through parents (max level is 5) and search inside theirs subtrees if the element is anonymous then search in whole anonymous subtree, here the attribute anonid is used instead of id attribute accessible properties this section describes common rules how accessibility properties are formed for xul elements.
... name the following rules to generate accessible name are applied: check aria-labelledby attribute, name is generated from elements pointed by aria-labelledby attribute <description id="descr1">label1</description> <description id="descr2">label2</description> <textbox aria-labelledby="descr1 descr2" /> if the element implements nsidomxullabeledcontrolelement or nsidomxulselectcontrolitemelement interface then it is used label property if the element doesn't implement nsidomxulselectcontrolelement then label attribute is used if neighbour of the element has label element pointing to this element by the control attribute, if the label element is found then use value attribute or its content.
...ement is anonymous child of the element that is the direct child of toolbaritem element or the element is direct child of toolbaritem element then title attribute of toolbaritem element is used (currently it's used in firefox ui only) if the element has aria role and the role allows to aggregate name from subtree of element then generate name from subtree of the element description the following rules to generate accessible description are applied: check aria-describedby attribute, description is generated from elements pointed by aria-describedby attribute <description id="descr1">label1</description> <description id="descr2">label2</description> <textbox aria-describedby="descr1 descr2" /> if neighbour of the element has description element pointing to this element by the control attr...
An Overview of XPCOM
someclass class initialization class someclass { public: // constructor someclass(); // virtual destructor virtual ~someclass(); // init method void init(); void dosomethinguseful(); }; for this system to work properly, the client programmer must pay close attention to whatever rules the component programmer has established.
... this is the contractual agreement of this unencapsulated class: a set of rules that define when each method can be called and what it is expected to do.
... one rule might specify that dosomethinguseful may only be called after a call to init().
... in addition to writing well-commented code that tells the client developer the rules about init(), the developer can take a couple steps to make this contract even clearer.
nsIHTMLEditor
used primarily to supply new element for various insert element dialogs (image, link, table, and horizontalrule are the only returned elements as of 9/12/18); namedanchor was removed in firefox 63.
... getselectedelement() return an element only if it is the only node selected, such as an image, horizontal rule, and so on.
... void indent( in astring aindent ); parameters aindent insertelementatselection() insert an element, which may have child nodes, at the selection used primarily to insert a new element for various insert element dialogs, but it enforces the html 4.0 dtd "cancontain" rules, so it should be useful for other elements.
... the selection is set to parent-of-aelement with an offset 1 greater than aelement's offset but it enforces the html 4.0 dtd "cancontain" rules, so it should be useful for other elements.
Getting Started Guide
a good place to learn about the basic rules and reasoning behind com is in essential com by don box.
... a rule of xpcom is that any function that creates or returns an interface pointer will have already addrefed it.
...queryinterface is a getter like any other, and you already know one way to call it, applying the getter_addrefs rule, as described above.
... given what you now know, the rule is predictable.
Plug-in Basics - Plugins
the next section, how gecko finds plug-ins, describes these rules, and the following section, checking plug-ins by mime type, describes how you can use javascript to locate plug-ins yourself and establish which ones are to be registered for which mime types.
...though the object element has no hidden attribute, you can create css rules to override the sizing attributes of the object element object { visibility: visible; } object.hiddenobject { visibility: hidden !important; width: 0px !important; height: 0px !important; margin: 0px !important; padding: 0px !important; border-style: none !important; border-width: 0px !important; max-width: 0px !important; ma...
... nesting rules for html elements the rules for descending into nested object and embed elements are as follows: the browser looks at the mime type of the top element.
... if the mime type is unknown and there is no reference to a plug-in that can be used, the browser descends into the child element, where these rules for handling mime types are repeated.
Tips - Firefox Developer Tools
in the rules view: click the inspector icon () next to any selector to highlight all elements that match it.
... click the inspector icon () next to the element{} rule to lock the highlighter on the current element.
... right-click on a name, value, or rule to copy anything from the name, the value, the declaration or the whole rule to your clipboard.
... click an @media rule to apply it in responsive design mode.
CanvasRenderingContext2D.addHitRegion() - Web APIs
fillrule the algorithm by which to determine if a point is inside or outside the hit region.
... possible values: nonzero: the non-zero winding rule.
... default rule.
... evenodd: the even-odd winding rule.
Applying styles and colors - Web APIs
canvas fill rules when using fill (or clip and ispointinpath) you can optionally provide a fill rule algorithm by which to determine if a point is inside or outside a path and thus if it gets filled or not.
... two values are possible: "nonzero": the non-zero winding rule, which is the default rule.
... "evenodd": the even-odd winding rule.
... in this example we are using the evenodd rule.
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
there are rules in the browser engine that decide which whitespace characters are useful and which aren’t — these are specified at least in part in css text module level 3, and especially the parts about the css white-space property and whitespace processing details, but we also offer an easier explanation below.
... inside this context, whitespace character processing can be summarized as follows: first, all spaces and tabs immediately before and after a line break are ignored so, if we take our example markup from before and apply this first rule, we get: <h1>◦◦◦hello⏎ <span>◦world!</span>⇥◦◦</h1> next, all tab characters are handled as space characters, so the example becomes: <h1>◦◦◦hello⏎ <span>◦world!</span>◦◦◦</h1> next, line breaks are converted to spaces: <h1>◦◦◦hello◦<span>◦world!</span>◦◦◦</h1> after that, any space immediately following another space (eve...
...blocks occupy the full width available and are stacked on top of each other, which means that we end up with a layout composed of this list of blocks: <block>⏎⇥</block> <block>◦◦hello◦◦</block> <block>⏎◦◦◦</block> <block>◦◦world!◦◦</block> <block>◦◦⏎</block> this is then simplified further by applying the processing rules for whitespace in inline formatting contexts to these blocks: <block></block> <block>hello</block> <block></block> <block>world!</block> <block></block> the 3 empty blocks we now have are not going to occupy any space in the final layout, because they don’t contain anything, so we’ll end up with only 2 blocks taking up space in the page.
... we said that there were rules to ignore most characters but that word-separating characters remain.
Introduction - Web APIs
css is a simple way to apply style rules to a web document.
... these style rules define how the document (the content) should be laid out.
...xslt takes an xml document (the content) and creates a brand new document based on the rules in the xsl stylesheet.
... transformations in xslt are based on rules that consist of templates.
-ms-high-contrast - CSS: Cascading Style Sheets
active indicates that the subsequent styling rules will be applied when the system is placed in high contrast mode with any color variation.
... black-on-white indicates that the subsequent styling rules will be applied when the system is placed in high contrast mode with a black-on-white color variation.
... white-on-black indicates that the subsequent styling rules will be applied when the system is placed in high contrast mode with a white-on-black color variation.
... @media screen and (-ms-high-contrast: active) { /* all high contrast styling rules */ } @media screen and (-ms-high-contrast: black-on-white) { div { background-image: url('image-bw.png'); } } @media screen and (-ms-high-contrast: white-on-black) { div { background-image: url('image-wb.png'); } } accessibility concerns theming high contrast mode's theme colors come from a limited subset of deprecated css2 system colors.
@namespace - CSS: Cascading Style Sheets
@namespace is an at-rule that defines xml namespaces to be used in a css style sheet.
...the @namespace rule is generally only useful when dealing with documents containing multiple namespaces—such as html5 with inline svg or mathml, or xml that mixes multiple vocabularies.
... any @namespace rules must follow all @charset and @import rules, and precede all other at-rules and style declarations in a style sheet.
... the @namespace rule can also be used to define a namespace prefix.
@page - CSS: Cascading Style Sheets
WebCSS@page
the @page css at-rule is used to modify some css properties when printing a document.
... the @page at-rule can be accessed via the css object model interface csspagerule.
...meanwhile do not use them within a @page at-rule.
... working draft no change from css level 2 (revision 1), though more css at-rules can be used inside a @page.
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
when you use css grid layout you create a layout and then you place items into it, or you allow the auto-placement rules to place the items into the grid cells according to that strict grid.
...however, it has been taken out of flow as is usual for absolutely positioned items and so the auto-placement rules now place items into the same space.
... if we remove position: absolute from the rules for .box3 you can see how it would display without the positioning.
... <div class="nested">c</div> </div> <div class="box box2">two</div> <div class="box box3">three</div> <div class="box box4">four</div> <div class="box box5">five</div> </div> .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: minmax(100px, auto); } .box1 { grid-column-start: 1; grid-column-end: 4; } if i now add display: contents to the rules for box1, the box for that item vanishes and the sub-items now become grid items and lay themselves out using the auto-placement rules.
Using Media Queries for Accessibility - CSS: Cascading Style Sheets
values active indicates that the subsequent styling rules will be applied when the system is placed in high contrast mode with any color variation.
... black-on-white indicates that the subsequent styling rules will be applied when the system is placed in high contrast mode with a black-on-white color variation.
... white-on-black indicates that the subsequent styling rules will be applied when the system is placed in high contrast mode with a white-on-black color variation.
... @media screen and (-ms-high-contrast: active) { /* all high contrast styling rules */ } @media screen and (-ms-high-contrast: black-on-white) { div { background-image: url('image-bw.png'); } } @media screen and (-ms-high-contrast: white-on-black) { div { background-image: url('image-wb.png'); } } ...
hyphens - CSS: Cascading Style Sheets
WebCSShyphens
hyphenation rules are language-specific.
... note: the rules defining how hyphenation is performed are not explicitly defined by the specification, so the exact hyphenation may vary from browser to browser.
... auto the browser is free to automatically break words at appropriate hyphenation points, following whatever rules it chooses.
... note: the auto setting's behavior depends on the language being properly tagged to select the appropriate hyphenation rules.
line-break - CSS: Cascading Style Sheets
/* keyword values */ line-break: auto; line-break: loose; line-break: normal; line-break: strict; line-break: anywhere; /* global values */ line-break: inherit; line-break: initial; line-break: unset; syntax values auto break text using the default line break rule.
... loose break text using the least restrictive line break rule.
... normal break text using the most common line break rule.
... strict break text using the most stringent line break rule.
offset-path - CSS: Cascading Style Sheets
] ) | <path()> | <url> | [ <basic-shape> | <geometry-box> ]where <size> = closest-side | farthest-side | closest-corner | farthest-corner | <length> | <length-percentage>{2}<path()> = path( [ <fill-rule>, ]?
... <string> )<basic-shape> = <inset()> | <circle()> | <ellipse()> | <polygon()> | <path()><geometry-box> = <shape-box> | fill-box | stroke-box | view-boxwhere <length-percentage> = <length> | <percentage><fill-rule> = nonzero | evenodd<inset()> = inset( <length-percentage>{1,4} [ round <'border-radius'> ]?
...)<polygon()> = polygon( <fill-rule>?
... stroke-linecap="round" /> <path id="firstscissorhalf" class="scissorhalf" d="m30,0 h-10 a10,10 0 0,0 -20,10 a20,20 0 1,1 -40,-10 h20 a10,10 0 0,1 30,0 m-40,20 a10,10 1 0,0 -40,0 a10,10 1 0,0 -40,20 m0,0" transform="translate(0,0)" fill="green" stroke="black" stroke-width="5" stroke-linejoin="round" stroke-linecap="round" fill-rule="evenodd" /> <path id="secondscissorhalf" class="scissorhalf" d="m30,0 h-10 a10,10 0 0,1 -20,-10 a20,20 0 1,0 -40,10 h20 a10,10 0 0,0 30,0 m-40,-20 a10,10 1 0,0 -40,0 a10,10 1 0,0 -40,-20 m0,0" transform="translate(0,0)" fill="forestgreen" stroke="black" stroke-width="5" stroke-linejoin="round" stroke-linecap="round" fill-rule="eve...
Arrow function expressions - JavaScript
the this value of the enclosing lexical scope is used; arrow functions follow the normal variable lookup rules.
...llowing code, the this within the function that is passed to setinterval has the same value as the this in the lexically enclosing function: function person(){ this.age = 0; setinterval(() => { this.age++; // |this| properly refers to the person object }, 1000); } var p = new person(); relation with strict mode given that this comes from the surrounding lexical context, strict mode rules with regard to this are ignored.
... var f = () => { 'use strict'; return this; }; f() === window; // or the global object all other strict mode rules apply normally.
... var func = (a, b, c) => 1; var func = (a, b, c) => ( 1 ); var func = (a, b, c) => { return 1 }; var func = ( a, b, c ) => 1; // no syntaxerror thrown parsing order although the arrow in an arrow function is not an operator, arrow functions have special parsing rules that interact differently with operator precedence compared to regular functions.
An Overview - XSLT: Extensible Stylesheet Language Transformations
unlike css, which has its own specialized syntax, an xslt stylesheet is an xml document, which must conform to all xml rules, including well-formedness.
... in essence, an xslt stylesheet is a set of rules, called templates, which declare that any node that matches this specific pattern should be manipulated in this specific way and end up in this specific position in the result tree.
... potential conflicts in template matching are resolved by using a set of cascading precedence rules.
... in general, a more specific template rule takes precedence over a less specific one and, other things being equal, a template rule that appears later in the document takes precedence over one that appears earlier.
Content Scripts - Archive of obsolete content
the contentscript option treats the string itself as a script: // main.js var pagemod = require("sdk/page-mod"); var contentscriptvalue = 'document.body.innerhtml = ' + ' "<h1>page matches ruleset</h1>";'; pagemod.pagemod({ include: "*.mozilla.org", contentscript: contentscriptvalue }); the contentscriptfile option treats the string as a resource:// url pointing to a script file stored in your add-on's data directory.
... this add-on supplies a url pointing to the file "content-script.js", located in the data subdirectory under the add-on's root directory: // main.js var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscriptfile: data.url("content-script.js") }); // content-script.js document.body.innerhtml = "<h1>page matches ruleset</h1>"; from firefox 34 onwards, you can use "./content-script.js" as an alias for self.data.url("content-script.js").
...this enables you to load a javascript library like jquery by url, then pass in a simple script inline that can use jquery: // main.js var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); var contentscriptstring = '$("body").html("<h1>page matches ruleset</h1>");'; pagemod.pagemod({ include: "*.mozilla.org", contentscript: contentscriptstring, contentscriptfile: data.url("jquery.js") }); unless your content script is extremely simple and consists only of a static string, don't use contentscript: if you do, you may have problems getting your add-on approved on amo.
Appendix: What you should know about open-source software licenses - Archive of obsolete content
the “no discrimination may be made against individuals or organizations” rule means that you cannot prohibit it from any particular country.
... the “no discrimination may be made based on field of endeavor” rule means that you cannot prevent it from being used in warfare.
... the “no additional licensing can be required when redistributing” rule means that you cannot prohibit the software’s use from anyone who does not buy a separate license.
Custom XUL Elements with XBL - Archive of obsolete content
replacing existing xul elements as seen in the beginning of this section, the actual binding process is determined by a simple css rule that associates the tag name with the binding.
... this means that you can change the binding for pretty much any element in firefox by just adding a css rule!
...if you only need to change some specific instances of an element, use very specific css rules.
Handling Preferences - Archive of obsolete content
make the window modal in systems where the instant apply rule is not used.
...changing the value in the control will change the preference (depending on the instant apply rule), and vice versa.
...this way you don't have to rewrite all the css rules defined for firefox.
Setting Up a Development Environment - Archive of obsolete content
it's a very useful inspection tool that lets you look into the dom of html and xul documents, as well as applied css rules and associated javascript objects.
... the dom inspector is particularly useful in finding out how to overlay a window, and how to replace default css style rules.
...inspect the css rules firefox applies to it by default.
The Essentials of an Extension - Archive of obsolete content
you also probably noticed how we format our code, and wonder about the rules we follow.
... our general rule on line length is not having lines longer than 80 characters.
...it greatly complicates the work of localizers, and grammar rules on different languages may change the ordering of the sentence entirely.
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
this includes rules and guidelines applying to everything from headers, footers, page hierarchy, titles, typography, iconography, navigation, and others.
...because of the iframe, we backed off of the idea that we'd be able to adhere to xhtml strict rules, and settled for using the xhtml transitional dtd.
...our writers and editors must get used to some new rules when generating the day's stories.
XUL user interfaces - Archive of obsolete content
examine the document's stylesheet to ensure that you understand all the rules there.
... if there is a rule that you do not understand, comment it out and refresh your browser to see the effect on the document.
... using this knowledge, add a rule to the stylesheet that makes the background of the date box pale blue when it has keyboard focus (but white when keyboard focus is somewhere else).
MMgc - Archive of obsolete content
all of the rules from gcobject above apply to gcfinalizedobject.
...all of the rules for gcobject apply to rcobject, and there are a few more: any pointer to a rcobject from unmanaged memory must use the drc macro.
...finalizer access rules finalizers are very restricted in the set of objects they may access.
Images, Tables, and Mysterious Gaps - Archive of obsolete content
in the simplest case, we might add a style like this: td img {display: block;} consider this rule when applied to the following markup: <table cellspacing="0" cellpadding="0" border="0" width="500"> <tr><td><img src="nav1.gif"><img src="nav2.gif"><img src="nav3.gif"><img src="nav4.gif"><img src="nav5.gif"></td></tr> <tr><td style="background: red;"> <img src="smallred.gif" height="1" width="1"></td></tr> <tr><td> <p style="margin: 0.5em;">this is text in another cell of the table.
... one potential solution is to add a class to any image that needs to be block-level and then write the rule to match.
...should this property be adopted, then any browser supporting it could emulate traditional "shrinkwrap" behavior without risking other layout upset with the following rule: td {line-box-contain: font replaced;} /* proposed for css3 */ there are other possible fixes contained within the current css3 working drafts, such as line-height-policy.
Specifying the appearance - Archive of obsolete content
for this we have to first create four icons, one for each tinderbox state (none, success, test failed, and busted), then create a set of css rules that displays the icon corresponding to the current tinderbox state: statusbarpanel#tinderbox-status { list-style-image: url("chrome://navigator/content/tb-nostatus.png"); } statusbarpanel#tinderbox-status[status="success"] { list-style-image: url("chrome://navigator/content/tb-success.png"); } statusbarpanel#tinderbox-status[status="testfailed"] { list-style-image: url("chrome://navigator/content/tb-testfailed.png"); } statusbarpanel#tinderbox-status[status="busted"] { list-style-image: url("chrome://navigator/content/tb-bus...
...ted.png"); } mozilla can have multiple sets of stylesheets that govern its appearance, and we don't want to have to add these rules to each set (and have our extension break when a new set gets installed), so we'll put this stylesheet in a file called tinderstatus.css in the same directory as navigator.xul and reference it at the top of that file right under the global stylesheet reference: <?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?> <?xml-stylesheet href="chrome://navigator/content/tinderstatus.css" type="text/css"?> our css rules use the list-style-image property to define an image to appear when our status bar panel, identified by its id attribute, has a given value for its status attribute.
... there is one rule for each possible tinderbox state.
In-Depth - Archive of obsolete content
but what we're interested in is the css style rules.
... click the icon located above the dom information and choose css style rules.
...if you go back into the dom inspector and look at the rule column again, you'll see the #back-button id.
Exception logging in JavaScript - Archive of obsolete content
exception reporting in firefox 3 firefox 3 improves reporting of unhandled exceptions by establishing a set of rules that determines whether or not an exception is worth reporting: any methods on interfaces annotated with the [function] attribute in idl (see, for example, nsidomeventlistener) that throw exceptions always report those exceptions into the error console.
...in other words, all unhandled javascript exceptions (except those in rules 3 and 4 above) will be logged before control returns to the outermost c++ caller.
...note that the following will have no effect on the ns_nointerface exceptions outlined in rules 3 and 4 above - those exceptions will not be reported in any case.
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
you can access, remove, and change an element's css rules through the element's style member: <div id="mydiv" style="border: _fckstyle="border: 1px solid black;"> text </div> <script> var myelm = document.getelementbyid("mydiv"); myelm.style.width = "40px"; </script> you can reach every css attribute that way.
...you can use two ways to make mozilla behave like internet explorer and not change the color of the text when hovered over: first, you can change the css rule to be a:link:hover {color: green;}, which will only change the color if the element is a link (has an href attribute).
... --- inserthorizontalrule inserts an <hr> element at the cursor's position.
Elements - Archive of obsolete content
from several bindings only the last in the sequence will be used (like with any css rule).
... inheritstyle - the inheritstyle attribute indicates whether style rules from the document will affect anonymous content generated by the xbl binding.
...the style rules in the style sheet will only be applied to the binding, not to other elements in the document.
Additional Template Attributes - Archive of obsolete content
this isn't particularly useful although there is a very slight optimization since the builder does not need to scan the action body looking for the member variable when compiling the queries and rules.
... <hbox datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> <template container="?start" member="?photo"> <rule> <image uri="?photo" src="?photo"/> </rule> </template> </hbox> in this example, the ?photo variable can be used instead of 'rdf:*' (although you can use either even if you specify the member variable).
...note also that a rule element is needed here, otherwise the builder will think the container and member attributes are conditions to check.
Attribute Substitution - Archive of obsolete content
in a stylesheet, you could set properties for each of these classes such that different values appear differently without having to use multiple rules.
...as the datasource loads, the query and rules are examined with the new data as it arrives.
... this causes rules to create matches as the data loads.
Building Trees - Archive of obsolete content
this template uses the simple rule syntax.
...<rule> <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://www.xulplanet.com/rdf/country" object="?country"/> <triple subject="?country" predicate="http://purl.org/dc/elements/1.1/title" object="?countrytitle"/> </query> <action> <treechildren> <treeitem uri...
...="?photo"> <treerow properties="?countrytitle"> <treecell src="?photo"/> </treerow> </treeitem> </treechildren> </action> </rule> you might use the following css to change the border around rows listing a particular country: treechildren::-moz-tree-row(netherlands) { border: green 1px solid; } the result of this example is a tree where one row has a green border around it.
RDF Modifications - Archive of obsolete content
the template builder will need to check all of the queries and rules to see if this triple could cause a change in what would be displayed.
... rdf changes that affect a binding often, a new rdf triple is created in the datasource which would only affect a template rule's bindings.
... since the bindings section of a rule specifies predicates that may optionally have values, the addition or removal or this rdf data would never be able to add or remove a new result.
Template Builder Interface - Archive of obsolete content
this method removes any existing generated content and deletes all data in the rule network.
... then, the method recompiles the query and the rules and regenerates the content.
...however, this is often used if you modify the datasource or modify the rules.
Using Multiple Queries to Generate More Results - Archive of obsolete content
recall that when the member resource for a query matches several rules, only the earliest query that matches will have content generated for it.
... <template> <queryset> <query> <content uri="?start"/> <member container="?start" child="?item"/> </query> <rule> <binding subject="?item" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> <action> <label uri="?item" value="?title" class="header"/> </action> </rule> </queryset> <queryset> <query> <content uri="?start"/> <triple subject="?start" predicate="http://www.xulplanet.com/rdf/people" object="?people"/> <member container="?peop...
...le" child="?item"/> </query> <rule> <binding subject="?item" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> <action> <label uri="?item" value="?title"/> </action> </rule> </queryset> </template> you can view the example.
Using Recursive Templates - Archive of obsolete content
you could use multiple rules as well, in order to generate different output for each level.
...<vbox datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="*"> <assign var="?type" expr="local-name(.)"/> </query> <rule> <where subject="?type" rel="equals" value="group"/> <action> <groupbox uri="?"> <caption label="?name"/> </groupbox> </action> </rule> <rule> <action> <label uri="?" value="?name"/> </action> </rule> </template> </vbox> the first rule contains a where clause which matches only those results that have a type of group.
...the second rule has no where conditions, so this matches all remaining results.
Styling a Tree - Archive of obsolete content
the style sets style rules for particular parts of what it displays.
... this style rule means, inside a treechildren element, set the background color to blue for all tree rows that have the 'makeitblue' property.
...note that the first rule will apply to any row that is 'readonly' regardless of whether other properties such as 'unread' are set.
bindings - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] used to specify a set of variable bindings for a rule.
... this element should be contained within a rule element and contain one or more binding elements.
... this element is optional in firefox 3/mozilla 1.9 and later; instead binding elements may be placed directly inside the rule element.
conditions - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element should appear directly inside a rule element and is used to define conditions for the rule.
...when evaluating the rule for a particular rdf resource, the variables are replaced with values from the resource.
... if all variables can be replaced, the rule matched.
content - Archive of obsolete content
this attribute is useful to provide different rules for outer and inner elements.
...when a rule is evaluated, it scans through each resource in the rdf datasource looking for a match.
...then, the other rules are evaluated for a match.
triple - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a triple can be included inside a rule's conditions element.
...if such an assertion exists, the rule may match, assuming that all the conditions match.
... if the assertion does not exist, the rule will not match.
background-size - Archive of obsolete content
i'm guessing not, just asking because having both rules in for 3.6 creates a strange effect: -moz-border-image gets inherited by every element on the page user:robertc 2009-08-08 -moz-border-image should not inherit.
...user:jürgen jeka 2009-08-09 ok, here's a page with both rules - the css is derived from the code on the page here, this is what it looks like in 3.6a2pre on linux, the background image appears on the whole page, and then again behind the main content.
... here's a slightly more complex example (screenshot), and the same page without the -moz-border-image image rule (screenshot).
XForms Custom Controls - Archive of obsolete content
here is a snippet from our .css file to show the type of css rule we would use to make such a determination.
...we recommend that you use this attribute to create the css binding rule for your custom control.
...for example, when the control needs to be updated according to the rules of xforms, the refresh method will be called by the processor.
IDL - MDN Web Docs Glossary: Definitions of Web-related terms
if you pass another type, it is automatically converted to a number as specified by the standard javascript rules for type conversion.
...unfortunately, there are no clear rules and the way idl attributes behave in conjunction with their corresponding content attributes depends on the attribute.
... most of the time, it will follow the rules laid out in the specification, but sometimes it doesn't.
Images, media, and form elements - Learn web development
therefore if you want to be sure that your form fields use the font defined on the body, or on a parent element, you should add this rule to your css.
... button, input, select, textarea { font-family : inherit; font-size : 100%; } form elements and box-sizing across browsers form elements use different box sizing rules for different widgets.
... for consistency it is a good idea to set margins and padding to 0 on all elements, then add these back in when styling particular controls button, input, select, textarea { box-sizing: border-box; padding: 0; margin: 0; } other useful settings in addition to the rules mentioned above, you should also set overflow: auto on <textarea>s to stop ie showing a scrollbar when there is no need for one: textarea { overflow: auto; } putting it all together into a "reset" as a final step, we can wrap up the various properties discussed above into the following "form reset" to provide a consistent base to work from.
Type, class, and ID selectors - Learn web development
try adding a css rule to select the <h1> element and change its color to blue.
... this approach reduces the scope of a rule as the rule will only apply to that particular element & class combination; so you would need to add another selector if you decided the rule should apply to other elements too.
... note: as we learned in the lesson on specificity, an id has high specificity and will overrule most other selectors.
The box model - Learn web development
any direct children of this box will become flex items and will be laid out according to the rules set out in the flexbox spec, which you'll learn about later on.
... there are a number of rules that dictate when margins do and do not collapse.
... add display: inline-block to the rule with the .links-list a selector, and you will see how it fixes this issue by causing the padding to be respected by other elements.
Grids - Learn web development
.container { display: grid; grid-template-columns: 200px 200px 200px; } add the 2nd declaration to your css rule, then reload the page, and you should see that the items have rearranged themselves one into each cell of the created grid.
...add the following rules to the bottom of your css: header { grid-column: 1 / 3; grid-row: 1; } article { grid-column: 2; grid-row: 2; } aside { grid-column: 1; grid-row: 2; } footer { grid-column: 1 / 3; grid-row: 3; } line-based placement body { width: 90%; max-width: 900px; margin: 2em auto; font: .
...phasellus turpis est, posuere sit amet dapibus ut, facilisis sed est.</p> </aside> <footer>contact me@mysite.com</footer> </div> the rules for grid-template-areas are as follows: you need to have every cell of the grid filled.
Introduction to CSS layout - Learn web development
i don’t need to put any rules on the child elements; they are automatically placed into the cells our grid has created.
...to do this, we could add the following rule to add relative positioning: .positioned { position: relative; top: 30px; left: 30px; } here we give our middle paragraph a position value of relative — this doesn't do anything on its own, so we also add top and left properties.
... going back to our original non-positioned example, we could add the following css rule to implement absolute positioning: .positioned { position: absolute; top: 30px; left: 30px; } here we give our middle paragraph a position value of absolute, and the same top and left properties as before.
What is CSS? - Learn web development
css syntax css is a rule-based language — you define rules specifying groups of styles that should be applied to particular elements or groups of elements on your web page.
... for example "i want the main heading on my page to be shown as large red text." the following code shows a very simple css rule that would achieve the styling described above: h1 { color: red; font-size: 5em; } the rule opens with a selector .
... a css stylesheet will contain many such rules, written one after the other.
Sending form data - Learn web development
this is a topic far beyond this guide, but there are a few rules to keep in mind.
... the most important rule is: never ever trust your users, including yourself; even a trusted user could have been hijacked.
... you should avoid many/most problems if you follow these three rules, but it's always a good idea to get a security review performed by a competent third party.
Handling common HTML and CSS problems - Learn web development
note: one common problem with css and html arises when different css rules begin to conflict with one another.
...if a browser encounters a declaration or rule it doesn't understand, it just skips it completely without applying it or throwing an error.
... of course, doing this for lots of different css rules can get really tedious.
Mozilla accessibility architecture
we will not rule out the possibility of supporting some of the rich atk interfaces on windows.
...also, what if they want to get dom information, like css rules, tag names and attributes, that msaa's iaccessible does not provide?
...accessibility api module directory structure general rules for the directory structure: interfaces, both internally-used cross-platform and toolkit-specific interfaces exist in accessible/public.
Gecko Keypress Event
when the keypress event includes modifier keys, sometimes the charcode value is replaced with an ascii character according to the following rules.
... (bug 359638 partially addressed this issue by trying both characters on the key, but bug 303192 would provide a complete solution.) solution the following rules apply: key handlers should be provided with information about all the possible meanings of the event.
... these conditions are complex, and the handling rules may be modified if new issues are discovered.
source-editor.jsm
ontextmenu "sourceeditorcontextmenu" sourceeditor.defaults.expandtab true sourceeditor.defaults.highlightcurrentline true sourceeditor.defaults.initialtext "" sourceeditor.defaults.keys null sourceeditor.defaults.mode sourceeditor.modes.text sourceeditor.defaults.readonly false sourceeditor.defaults.showannotationruler false sourceeditor.defaults.showlinenumbers false sourceeditor.defaults.showoverviewruler false sourceeditor.defaults.tabsize 4 sourceeditor.defaults.theme sourceeditor.themes.mozilla sourceeditor.defaults.undolimit 200 event name constants these constants provide the names of the editor events for which you can listen.
... showannotationruler boolean a boolean value indicating whether or not to display the annotations gutter/ruler.
... showoverviewruler boolean a boolean value indicating whether or not to show the overview gutter/ruler.
Localization content best practices
for example, app size in english may be capitalized via text-transform: uppercase to app size but in gaelic this would change meud na h-aplacaid to meud na h-aplacaid which violates the locales orthographic rules, as it ought to be meud na haplacaid.
...as a general rule, it's recommended to fix strings on the trunk/master repository, and create ad-hoc patches for string frozen repositories that don't involve string changes.
... feedback from l10n-drivers is not necessary for each landing involving strings, as long as you're following the basic rules described in this document.
JS_THREADSAFE
these are actually the same rules that apply to single-threaded jsapi programs.
... but in multithreaded programs, if you break the rules, your program is more likely to crash.
... the above rules mean that at any given moment, there can be either (a) multiple threads in active requests, or (b) one thread doing gc and all requests suspended.
Index
MozillaTechXPCOMIndex
776 nsimsgruleaction interfaces, interfaces:scriptable, xpcom, xpcom interface reference, thunderbird defined in comm-central/ mailnews/ base/ search/ public/ nsimsgfilter.idl 777 nsimsgsearchcustomterm interfaces, interfaces:scriptable, xpcom, xpcom interface reference, thunderbird defined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchcustomterm.idl 778 ...
...therefore they sometimes caused impossible scenarios in automated tests (what's tested with such events?) and js-ime and/or js-keyboard on firefox os or add-ons may dispatch events with wrong rules.
... in comm-central/ mailnews/ base/ public/ mailnewstypes2.idl 1127 nsmsglabelvalue xpcom, xpcom interface reference, thunderbird defined in comm-central/ mailnews/ base/ public/ mailnewstypes2.idl 1128 nsmsgpriorityvalue xpcom, xpcom interface reference, thunderbird defined in comm-central/ mailnews/ base/ public/ mailnewstypes2.idl 1129 nsmsgruleactiontype interfaces, interfaces:scriptable, xpcom, xpcom interface reference, thunderbird defined in comm-central/ mailnews/ base/ search/ public/ nsmsgfiltercore.idl 1130 nsmsgsearchattrib interfaces, interfaces:scriptable, xpcom, xpcom interface reference, thunderbird defined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl 1131 n...
nsIDOMFontFace
localname domstring null if not a src:local(...) rule.
... rule nsidomcssfontfacerule null if no associated @font-face rule.
... srcindex long index in the rule's src list, -1 if no @font-face rule.
nsITextInputProcessor
therefore they sometimes caused impossible scenarios in automated tests (what's tested with such events?) and js-ime and/or js-keyboard on firefox os or add-ons may dispatch events with wrong rules.
...although the rules to decide the keycode value are different on each web browser, you should use same rules as gecko because your events are dispatched on gecko.
...see "printable keys in standard position" section of keyboardevent.keycode for the strict rules of gecko.
nsCOMPtr versus RefPtr
general rule of thumb for nscomptr versus refptr the general rule of thumb is to use nscomptr<t> when t is an interface type, and refptr<t> when t is a concrete type.
... this basic rule derives from the fact that some of the nscomptr<t> code is factored into the nscomptr_base base class, which stores the underlying mrawptr as an nsisupports*.
...hence, the interface versus concrete class rule of thumb: interfaces will never multiply inherit from nsisupports, so they can always use be used with nscomptr without fear of breaking in the future.
XPIDL
there are some special rules for attribute naming.
...an exception to the above rule is if the parameter has the iid_is property (a special case for some queryinterface-like operations).
...afterwards, the above rules for out apply.
Mailnews and Mail code review requirements
mailnews and mail review rules patches affecting thunderbird user experience or interfaces note: it is recommended that when working on bugs that affect user experience or interfaces, that ui-review is obtained at an early stage in the patch development process.
... rules for all patches affecting mailnews/ and mail/ wherever possible, significant patches in a certain area should be reviewed by one of the listed sub-module owner/reviewers.
... unit test rules patches are required to include automated tests which are run during make check or via mozmill in thunderbird, but submitters are encouraged to request exceptions from reviewers in cases where the cost is believed to outweigh the benefit.
DOM Inspector FAQ - Firefox Developer Tools
how do i inspect pseudo-classes and pseudo-elements in the css rules viewer?
... there is currently no way to inspect dynamically-applied rules for other pseudo-classes or any pseudo-elements from the dom inspector ui.
... you can, however, find any rule in its parent style sheet (e.g., to modify it) by using the style sheets viewer in the document pane, and locating it in the css rules viewer in the object pane.
Eyedropper - Firefox Developer Tools
underneath the magnifying glass it shows the color value for the current pixel using whichever scheme you've selected in settings > inspector > default color unit: you can use it in one of two ways: to select a color from the page and copy it to the clipboard to change a color value in the inspector's rules view to a color you've selected from the page copying a color to the clipboard open the eyedropper in one of these two ways: select "eyedropper" under the "web developer" menu open the page inspector tab and click the eyedropper button in its toolbar as you move the mouse around the page you'll see the current color value in the eyedropper change.
... changing a color value in the rules view color values appearing in the inspector's rules view have color samples next to them: clicking the sample shows a color picker popup.
... now, when you click the eyedropper, the color in the rules view is set to the color you selected.
Edit fonts - Firefox Developer Tools
note: if you want to use a different unit such as pt for font-size or line-height, you can set the property value applied to the currently inspected element to use that unit via the rules view, and the font editor will automatically pick it up and make it available in the associated units dropdown menu.
... tips finally, here are a few tips for making effective use of the fonts tab: when using the page inspector's 3-pane mode, you can view the css rules for the inspected element simultaneously alongside the fonts tab.
... if you hover over the font-family property in the rules view, a tooltip shows a sample of the font: you'll also notice in the above screenshot that the font in the font-family font stack that is actually applied to the inspected element is underlined.
Work with animations - Firefox Developer Tools
it displays animations created using css transitions, css @keyframes rules, or the web animations api.
...in this case, the message is "animations of 'transform' cannot be run on the compositor when geometric properties are animated on the same element at the same time." edit @keyframes any @keyframes rules associated with the currently selected element are displayed in the rules view and are editable: edit timing functions when you create a css animation you can specify a timing function: this determines the rate at which the animation progresses.
... timing functions defined as cubic bézier curves get an icon in the rules view.
UI Tour - Firefox Developer Tools
the following image shows the 2-pane layout: in 2-pane mode, the inspector includes the html pane, and the css pane, which can contain one of six tools: rules view layout view computed view changes view compatibility view (firefox developer edition 77 and later) fonts view animations view the following image shows the 3-pane mode (available from firefox 62 onwards) which moves the css rules view into a separate pane in the center of the inspector.
... rules view the rules view lists all the rules that apply to the selected element, ordered from most-specific to least-specific.
... changes view when you are editing in the rules view, you can see the changes you have made in the changes view.
CSSStyleDeclaration - Web APIs
for example, document.stylesheets[0].cssrules[0].style returns a cssstyledeclaration object on the first css rule in the document's first stylesheet.
... cssstyledeclaration.parentruleread only the containing cssrule.
... example var styleobj = document.stylesheets[0].cssrules[0].style; console.log(styleobj.csstext); for (var i = styleobj.length; i--;) { var namestring = styleobj[i]; styleobj.removeproperty(namestring); } console.log(styleobj.csstext); specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration' in that specification.
Examples of web and XML development using the DOM - Web APIs
in the next example (see example 4), you can use stylesheets and their rules to change styles for whole documents.
...you can access these stylesheets and their rules individually using the stylesheet, style, and cssrule objects, as demonstrated in this example, which prints out all of the style rule selectors to the console.
... var ss = document.stylesheets; for(var i = 0; i < ss.length; i++) { for(var j = 0; j < ss[i].cssrules.length; j++) { dump( ss[i].cssrules[j].selectortext + "\n" ); } } for a document with a single stylesheet in which the following three rules are defined: body { background-color: darkblue; } p { font-face: arial; font-size: 10pt; margin-left: .125in; } #lumpy { display: none; } this script outputs the following: body p #lumpy example 5: event propagation this example demonstrates how events fire and are handled in the dom in a very simple way.
Element.scrollHeight - Web APIs
for example: html <form name="registration"> <p> <textarea id="rules">lorem ipsum dolor sit amet, consectetur adipiscing elit.
... </textarea> </p> <p> <input type="checkbox" id="agree" name="accept" /> <label for="agree">i agree</label> <input type="submit" id="nextstep" value="next" /> </p> </form> css #notice { display: inline-block; margin-bottom: 12px; border-radius: 5px; width: 600px; padding: 5px; border: 2px #7fdf55 solid; } #rules { width: 600px; height: 130px; padding: 5px; border: #2a9f00 solid 2px; border-radius: 5px; } javascript function checkreading () { if (checkreading.read) { return; } checkreading.read = this.scrollheight - this.scrolltop === this.clientheight; document.registration.accept.disabled = document.getelementbyid("nextstep").disabled = !checkreading.read; checkreading.noticeb...
..."thank you." : "please, scroll and read the following text."; } onload = function () { var otoberead = document.getelementbyid("rules"); checkreading.noticebox = document.createelement("span"); document.registration.accept.checked = false; checkreading.noticebox.id = "notice"; otoberead.parentnode.insertbefore(checkreading.noticebox, otoberead); otoberead.parentnode.insertbefore(document.createelement("br"), otoberead); otoberead.onscroll = checkreading; checkreading.call(otoberead); } specifications specification status comment css object model (cssom) view modulethe definition of 'element.scrollheight' in that specification.
HTMLOrForeignElement.dataset - Web APIs
name conversion dash-style to camelcase conversion a custom data attribute name is transformed to a key for the domstringmap entry with the following rules the prefix data- is removed (including the dash); for any dash (u+002d) followed by an ascii lowercase letter a to z, the dash is removed, and the letter is transformed into its uppercase counterpart; other characters (including other dashes) are left unchanged.
... camelcase to dash-style conversion the opposite transformation, which maps a key to an attribute name, uses the following rules: restriction: before the transformation, a dash must not be immediately followed by an ascii lowercase letter a to z; the prefix data- is added; any ascii uppercase letter a to z is transformed into a dash, followed by its lowercase counterpart; other characters are left unchanged.
... the restriction in the rules above ensures that the two transformations are the inverse one of the other.
:visited - CSS: Cascading Style Sheets
WebCSS:visited
to style links appropriately, put the :visited rule after the :link rule but before the :hover and :active rules, as defined by the lvha-order: :link — :visited — :hover — :active.
... styling restrictions for privacy reasons, browsers strictly limit which styles you can apply using this pseudo-class, and how they can be used: allowable css properties are color, background-color, border-color, border-bottom-color, border-left-color, border-right-color, border-top-color, column-rule-color, outline-color, text-decoration-color, and text-emphasis-color.
...of the properties that can be set with this pseudo-class, your browser probably has a default value for color and column-rule-color only.
@font-feature-values - CSS: Cascading Style Sheets
the @font-feature-values css at-rule lets you use a common name in the font-variant-alternates property for features activated differently in opentype.
... the @font-feature-values at-rule may be used either at the top level of your css or inside any css conditional-group at-rule.
...-value-block>+where <feature-value-block> = <feature-type> '{' <feature-value-declaration-list> '}'where <feature-type> = @stylistic | @historical-forms | @styleset | @character-variant | @swash | @ornaments | @annotation<feature-value-declaration-list> = <feature-value-declaration>where <feature-value-declaration> = <custom-ident>: <integer>+; examples using @styleset in a @font-feature-values rule /* at-rule for "nice-style" in font one */ @font-feature-values font one { @styleset { nice-style: 12; } } /* at-rule for "nice-style" in font two */ @font-feature-values font two { @styleset { nice-style: 4; } } … /* apply the at-rules with a single declaration */ .nice-look { font-variant-alternates: styleset(nice-style); } specifications specification sta...
@viewport - CSS: Cascading Style Sheets
WebCSS@viewport
the @viewport css at-rule lets you configure the viewport through which the document is viewed.
... @viewport { width: 100vw; /*sets the width of the actual viewport to the device width*/ } note: the use of <meta name="viewport"> tag overrides @viewport syntax the at-rule contains a set of nested descriptors in a css block that is delimited by curly braces.
... formal syntax @viewport { <group-rule-body> } examples setting viewport size, zoom, and orientation @viewport { min-width: 640px; max-width: 800px; } @viewport { zoom: 0.75; min-zoom: 0.5; max-zoom: 0.9; } @viewport { orientation: landscape; } specifications specification status comment css round display level 1the definition of '@viewport' in that specification.
Line-based placement with CSS Grid - CSS: Cascading Style Sheets
if we do not place these on to the grid in any way they will lay out according to the auto-placement rules, one item in each of the first four cells.
... .box1 { grid-column-start: 1; grid-column-end: 2; grid-row-start: 1; grid-row-end: 4; } as you position some items, other items on the grid will continue to be laid out using the auto-placement rules.
...remember that if you do not place all of the items, any leftover items will be placed according to auto-placement rules.
Media queries - CSS: Cascading Style Sheets
in css, use the @media at-rule to conditionally apply part of a style sheet based on the result of a media query.
... reference at-rules @import @media guides using media queries introduces media queries, their syntax, and the operators and media features which are used to construct media query expressions.
... specifications specification status comment media queries level 5 editor's draft css conditional rules module level 3 candidate recommendation media queries level 4 candidate recommendation media queries recommendation css level 2 (revision 1) recommendation initial definition ...
Mozilla CSS extensions - CSS: Cascading Style Sheets
mozilla applications such as firefox support a number of special mozilla extensions to css, including properties, values, pseudo-elements and pseudo-classes, at-rules, and media queries.
...th [superseded by the standard version border-inline-start-width] -moz-box-sizing [prefixed version still accepted] c clip-path [applying to more than svg] -moz-column-count [prefixed version still accepted] -moz-column-fill [prefixed version still accepted] -moz-column-gap [prefixed version still accepted] -moz-column-width [prefixed version still accepted] -moz-column-rule [prefixed version still accepted] -moz-column-rule-width [prefixed version still accepted] -moz-column-rule-style [prefixed version still accepted] -moz-column-rule-color [prefixed version still accepted] -moz-context-properties f–m filter [applying to more than svg] -moz-font-feature-settings [prefixed version still accepted] -moz-font-language-override [prefixed v...
...) :-moz-tree-checkbox :-moz-tree-column :-moz-tree-drop-feedback :-moz-tree-image :-moz-tree-indentation :-moz-tree-line :-moz-tree-progressmeter :-moz-tree-row :-moz-tree-row(hover) :-moz-tree-separator :-moz-tree-twisty u – x :-moz-ui-invalid :-moz-ui-valid :-moz-user-disabled ::-moz-viewport ::-moz-viewport-scroll :-moz-window-inactive ::-moz-xul-anonymous-block at-rules @-moz-document media features -moz-mac-graphite-theme -moz-maemo-classic -moz-device-pixel-ratio -moz-os-version -moz-scrollbar-end-backward -moz-scrollbar-end-forward -moz-scrollbar-start-backward -moz-scrollbar-start-forward -moz-scrollbar-thumb-proportional -moz-touch-enabled -moz-windows-accent-color-in-titlebar -moz-windows-classic -moz-windows-compositor -moz-window...
Cubic Bezier Generator - CSS: Cascading Style Sheets
d="output">log</output> </form> </html> .field { width: 40px; } function updatecanvas() { var x1 = document.getelementbyid('x1').value; var y1 = document.getelementbyid('y1').value; var x2 = document.getelementbyid('x2').value; var y2 = document.getelementbyid('y2').value; drawbeziercurve(x1, y1, x2, y2); } const radius = 4; // place needed to draw the rulers const rulers = 30.5; const margin = 10.5; const basic_scale_size = 5; // size of 0.1 tick on the rulers var scaling; //limitation: scaling is computed once: if canvas.height/canvas.width change it won't be recalculated var dragsm = 0; // drag state machine: 0 = nodrag, others = object being dragged function initcanvas() { // get the canvas element using the dom var canvas = document.ge...
...telementbyid('bezier'); // make sure we don't execute when canvas isn't supported if (canvas.getcontext) { // use getcontext to use the canvas for drawing var ctx = canvas.getcontext('2d'); scaling = math.min(canvas.height - rulers - margin, canvas.width - rulers - margin); canvas.onmousedown = mousedown; canvas.onmouseup = mouseup; } else { alert('you need safari or firefox 1.5+ to see this demo.'); } } function cx(x) { return x * scaling + rulers; } function reversex(x) { return (x - rulers) / scaling; } function lx(x) { //used when drawing vertical lines to prevent subpixel blur var result = cx(x); return math.round(result) == result ?
...2) { // get the canvas element using the dom var canvas = document.getelementbyid('bezier'); // make sure we don't execute when canvas isn't supported if (canvas.getcontext) { // use getcontext to use the canvas for drawing var ctx = canvas.getcontext('2d'); // clear canvas ctx.clearrect(0, 0, canvas.width, canvas.height); // draw the rulers ctx.beginpath(); ctx.strokestyle = "black"; // draw the y axis ctx.moveto(cx(0), cy(0)); ctx.lineto(cx(1), cy(0)); ctx.textalign = "right"; for (var i = 0.1; i <= 1; i = i + 0.1) { ctx.moveto(-basic_scale_size + cx(0), ly(i)); if ((i == 0.5) || (i > 0.9)) { ctx.moveto(-2 * basic_scale_size + cx(0),...
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
like any other property, this is written inside a ruleset, like so: element { --main-bg-color: brown; } note that the selector given to the ruleset defines the scope that the custom property can be used in.
...the value is computed where it is needed, not stored for use in other rules.
... for instance, you cannot set a property for an element and expect to retrieve it in a sibling's descendant's rule.
clip-path - CSS: Cascading Style Sheets
WebCSSclip-path
)<polygon()> = polygon( <fill-rule>?
... , [ <length-percentage> <length-percentage> ]# )<path()> = path( [ <fill-rule>, ]?
...| [ [ left | right ] <length-percentage> ] && [ [ top | bottom ] <length-percentage> ] ]<fill-rule> = nonzero | evenodd<box> = border-box | padding-box | content-box examples comparison of html and svg <svg class="defs"> <defs> <clippath id="mypath" clippathunits="objectboundingbox"> <path d="m0.5,1 c0.5,1,0,0.7,0,0.3 a0.25,0.25,1,1,1,0.5,0.3 a0.25,0.25,1,1,1,1,0.3 c1,0.7,0.5,1,0.5,1 z" /> </clippath> </defs> </svg> <div class="grid"> <div class="col"> <div class="...
filter - CSS: Cascading Style Sheets
WebCSSfilter
l; filter: unset; with a function, use the following: filter: <filter-function> [<filter-function>]* | none for a reference to an svg <filter> element, use the following: filter: url(file.svg#filter-element-id) interpolation if both the beginning and end filters have a function list of the same length without <url>, each of their filter functions is interpolated according to its specific rules.
... if they have different lengths, the missing equivalent filter functions from the longer list are added to the end of the shorter list using their lacuna values, then all filter functions are interpolated according to their specific rules.
... if one filter is none, it is replaced with the filter functions list of the other one using the filter function default values, then all filter functions are interpolated according to their specific rules.
inherit - CSS: Cascading Style Sheets
WebCSSinherit
for inherited properties, this reinforces the default behavior, and is only needed to override another rule.
... examples exclude selected elements from a rule /* make second-level headers green */ h2 { color: green; } /* ...but leave those in the sidebar alone so they use their parent's color */ #sidebar h2 { color: inherit; } in this example the h2 elements inside the sidebar might be different colors.
... for example, if one of them were the child of a div matched by the rule ...
Inheritance - CSS: Cascading Style Sheets
given the style rules: p { color: green; } ...
...given the style rules: p { border: medium solid; } ...
... see also css values for controlling inheritance: inherit, initial, unset, and revert introducing the css cascade cascade and inheritance css key concepts: css syntax, at-rule, comments, specificity and inheritance, the box, layout modes and visual formatting models, and margin collapsing, or the initial, computed, resolved, specified, used, and actual values.
list-style-type - CSS: Cascading Style Sheets
syntax /* partial list of types */ list-style-type: disc; list-style-type: circle; list-style-type: square; list-style-type: decimal; list-style-type: georgian; list-style-type: trad-chinese-informal; list-style-type: kannada; /* <string> value */ list-style-type: '-'; /* identifier matching an @counter-style rule */ list-style-type: custom-counter-style; /* keyword value */ list-style-type: none; /* global values */ list-style-type: inherit; list-style-type: initial; list-style-type: unset; the list-style-type property may be defined as any one of: a <custom-ident> value a symbols() value a <string> value the keyword none.
... extends the syntax to support @counter-style rules.
... working draft modify syntax to support for identifiers used in @counter-style rules to keywords.
revert - CSS: Cascading Style Sheets
WebCSSrevert
revert will not affect rules applied to children of an element you reset (but will remove effects of a parent rule on a child).
...but if you have a rule to make all paragraphs red then all paragraphs will still be red in all sections.
... h3 { font-weight: normal; color: blue; border-bottom: 1px solid grey; } <h3>this will have custom styles</h3> <p>just some text</p> <h3 style="all: revert">this should be reverted to browser/user defaults</h3> <p>just some text</p> revert on a parent reverting effectively removes the value for the element you select with some rule and only for that element.
text-decoration - CSS: Cascading Style Sheets
for example, in the markup <p>this text has <em>some emphasized words</em> in it.</p>, the style rule p { text-decoration: underline; } would cause the entire paragraph to be underlined.
... the style rule em { text-decoration: none; } would not cause any change; the entire paragraph would still be underlined.
... however, the rule em { text-decoration: overline; } would cause a second decoration to appear on "some emphasized words".
Event reference
cssruleviewrefreshed devtools specific the "rules" view of the style inspector has been updated.
... cssruleviewchanged devtools specific the "rules" view of the style inspector has been changed.
... cssruleviewcsslinkclicked devtools specific a link to a css file has been clicked in the "rules" view of the style inspector.
Content categories - Developer guides
this is a loose grouping (it doesn't actually create a relationship among elements of these categories), but they help define and describe the categories' shared behavior and their associated rules, especially when you come upon their intricate details.
... there are three types of content categories: main content categories, which describe common rules shared by many elements.
... form-related content categories, which describe rules common to form-related elements.
HTML attribute reference - HTML: Hypertext Markup Language
if you pass another type, it is automatically converted to a number as specified by the standard javascript rules for type conversion.
...unfortunately, there are no clear rules and the way idl attributes behave in conjunction with their corresponding content attributes depends on the attribute.
... most of the time, it will follow the rules laid out in the specification, but sometimes it doesn't.
<input type="password"> - HTML: Hypertext Markup Language
WebHTMLElementinputpassword
with a pattern, you can mandate case rules, require the use of some number of digits and/or punctuation characters, and so forth.
... <label for="userpassword">password: </label> <input id="userpassword" type="password" required> <input type="submit" value="submit"> specifying an input mode if your recommended (or required) password syntax rules would benefit from an alternate text entry interface than the standard keyboard, you can use the inputmode attribute to request a specific one.
...assorted rules for what values are permitted in each group exist as well.
Grammar and types - JavaScript
ecmascript also has rules for automatic insertion of semicolons (asi) to end statements.
...the names of variables, called identifiers, conform to certain rules.
... the scope rules for constants are the same as those for let block-scope variables.
Intl.Locale.prototype.caseFirst - JavaScript
the intl.locale.prototype.casefirst property is an accessor property that returns whether case is taken into account for the locale's collation rules.
... description a locale's collation rules are used to determine how strings are ordered in that locale.
...this additional rule can be expressed in a locale's casefirst property.
Lexical grammar - JavaScript
ecmascript also defines certain keywords and literals and has rules for automatic insertion of semicolons to end statements.
...g `string text ${expression} string text` automatic semicolon insertion some javascript statements must be terminated with semicolons and are therefore affected by automatic semicolon insertion (asi): empty statement let, const, variable statement import, export, module declaration expression statement debugger continue, break, throw return the ecmascript specification mentions three rules of semicolon insertion.
...these statements with "no lineterminator here" rules are: postfixexpressions (++ and --) continue break return yield, yield* module return a + b // is transformed by asi into return; a + b; specifications specification ecmascript (ecma-262)the definition of 'lexical grammar' in that specification.
Logical AND (&&) - JavaScript
short-circuit evaluation the logical and expression is evaluated left to right, it is tested for possible "short-circuit" evaluation using the following rule: (some falsy expression) && expr is short-circuit evaluated to the falsy expression; short circuit means that the expr part above is not evaluated, hence any side effects of doing so do not take effect (e.g., if expr is a function call, the calling never takes place).
...2 = true && false // t && f returns false a3 = false && true // f && t returns false a4 = false && (3 == 4) // f && f returns false a5 = 'cat' && 'dog' // t && t returns "dog" a6 = false && 'cat' // f && t returns false a7 = 'cat' && false // t && f returns false a8 = '' && false // f && f returns "" a9 = false && '' // f && f returns false conversion rules for booleans converting and to or the following operation involving booleans: bcondition1 && bcondition2 is always equal to: !(!bcondition1 || !bcondition2) converting or to and the following operation involving booleans: bcondition1 || bcondition2 is always equal to: !(!bcondition1 && !bcondition2) removing nested parentheses as logical expressions are evaluated left to right, it is...
... always possible to remove parentheses from a complex expression following some rules.
Logical OR (||) - JavaScript
short-circuit evaluation the logical or expression is evaluated left to right, it is tested for possible "short-circuit" evaluation using the following rule: (some truthy expression) || expr is short-circuit evaluated to the truthy expression.
... conversion rules for booleans converting and to or the following operation involving booleans: bcondition1 && bcondition2 is always equal to: !(!bcondition1 || !bcondition2) converting or to and the following operation involving booleans: bcondition1 || bcondition2 is always equal to: !(!bcondition1 && !bcondition2) removing nested parentheses as logical expressions are evaluated left to right, it is...
... always possible to remove parentheses from a complex expression following some rules.
SVG Presentation Attributes - SVG: Scalable Vector Graphics
alignment-baseline baseline-shift clip clip-path clip-rule color color-interpolation color-interpolation-filters color-profile color-rendering cursor direction display dominant-baseline enable-background fill fill-opacity fill-rule filter flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-orientation-horizontal glyph-orientation-vertical image-rendering kerning letter-spacing lighting-color marker-end marker-mid marker-start mask opacity overflow pointer-events shape-rendering solid-color solid-opacity stop-color stop-opacity stroke stroke-dasharray stroke-dashoffset stroke-lin...
... value: none|<funciri>|inherit; animatable: yes clip-rule it indicates how to determine what side of a path is inside a shape in order to know how a <clippath> should clip its target.
... value: <number>|<percentage>; animatable: yes fill-rule it indicates how to determine what side of a path is inside a shape.
fill - SVG: Scalable Vector Graphics
WebSVGAttributefill
(interior is define by the fill-rule attribute) value <paint> default value black animatable yes note: as a presentation attribute fill can be used as a css property.
...(interior is define by the fill-rule attribute) value <paint> default value black animatable yes note: as a presentation attribute fill can be used as a css property.
...(interior is define by the fill-rule attribute) value <paint> default value black animatable yes note: as a presentation attribute fill can be used as a css property.
XML introduction - XML: Extensible Markup Language
comments <!-- comment --> "correct" xml (valid and well-formed) Сorrect design rules for an xml document to be correct, the following conditions must be fulfilled: document must be well-formed.
... document must conform to all xml syntax rules.
... document must conform to semantic rules, which are usually set in an xml schema or a dtd (document type definition).
Extension Theming Guidelines - Archive of obsolete content
css selectors when writing stylesheet rules for windows that you are overlaying always try to be specific with the css selector.
... xul guidelines xbl bindings xbl bindings are applied using style rules.
Appendix F: Monitoring DOM changes - Archive of obsolete content
*/ if ('mozcsskeyframerule' in window || 'csskeyframerule' in window) { var watchnodes = function watchnodes(selector, callback, doc) { const event = watchnodes.prefix + (watchnodes._i++); const xhtml = 'http://www.w3.org/1999/xhtml'; doc = doc || document; let style = doc.createelementns(xhtml, 'style'); style.setattribute('type', 'text/css'); let preamble = ' @-mo...
... style = components.utils.getweakreference(style); return function unwatch() { if (style.get()) { style.get().ownerdocument.removeeventlistener('animationstart', listener, false); style.get().parentnode.removechild(style.get()); } }; } watchnodes.namespace = 'mozcsskeyframerule' in window ?
The Box Model - Archive of obsolete content
a common exception to this rule is when your css is directly related to images, where you'll usually handle measurements in pixels (px).
...and look into the box model, css style rules and computed style views.
XML data - Archive of obsolete content
to do this, your stylesheet uses rules that map tags in the xml document to the display types used by html.
... in the document's stylesheet, you specify how info elements are to be displayed: info { display: block; margin: 1em 0; } the most common values for the display property are: block displayed like html's div (for headings, paragraphs) inline displayed like html's span (for emphasis within text) add your own style rules that specify the font, spacing and other details in the same way as for html.
Layout System Overview - Archive of obsolete content
layout creates frames for content based on either the specific html rules for an element or based on the css display type of the element.
...this causes the style system to apply all style rules that correspond to the element and results in a resolved style context - the style data specific to that element.
Mozilla Crypto FAQ - Archive of obsolete content
export controls on encryption software already been ruled unconstitutional?
... yes in a specific case, but the decision may yet be overruled.
The new nsString class implementation (1999) - Archive of obsolete content
usage patterns how to use these classes to increase the portability, thread and process safety of gecko, i suggest the following rules regarding the use of each of our string class derivatives: <center> string class</center> <center> where to use</center> nsstrimpl use to pass strings between modules who have linked the nsstrimpl function library.
...note: the com rules imply that everyone needs to use the same allocators, that they acquire via a global com service called cogetmalloc().
When To Use ifdefs - Archive of obsolete content
as a general rule, any code in tier 2, tier 9, or tier 50 is shared code, and should not have application-specific ifdefs.
...this rule has many exceptions, some of which are listed here: the code in editor/ui/ is built by the suite, standalone composer, and thunderbird, but it is considered application-specific.
execute - Archive of obsolete content
the following parsing rules apply: double quotes are treated as quotes; single quotes are ignored by the executable but legal in the execute() method.
... this means that in order to pass three command-line arguments (-c, -d, and -s) to the executable, you should format the args string as follows: err = file.execute(myfile, '"-c""-d""-s"', true); //technically, given the rules above, you could also pass the same //arguments with the following line, but the result is much less //readable: err = file.execute(myfile, "\"-c\"\"-d\"\"-s\"", true); also see the note about binaries on the macintosh platform in addfile.
A XUL Bestiary - Archive of obsolete content
the differences here are significant: xul is the universe of elements, attributes, syntax, rules, and relationships, while xptoolkit is really the finite set of interface-specific elements created in xul.
...xpcom enforces rules for design and compilation that make it possible to use the services of an object without knowing anything about implementation.
parent - Archive of obsolete content
« xul reference home parent type: element tag name if set, the rule will only match the corresponding tag.
... this may be used to have separate rules for leaf and container nodes with different tags.
style - Archive of obsolete content
« xul reference home style type: css inline style css style rules to be applied to the element.
...it is preferred to put style rules in style sheets.
Building accessible custom components in XUL - Archive of obsolete content
in xul, we will need to handle this ourselves, again with css rules.
..."accjax spreadsheet" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:x2="http://www.w3.org/tr/xhtml2" xmlns:wairole="http://www.w3.org/2005/01/wai-rdf/guiroletaxonomy#" xmlns:waistate="http://www.w3.org/2005/01/wai-rdf/guistatetaxonomy#" onload="install_handlers()" > <script src="accjax.js"/> </code> by adding this javascript code and these css rules, we can tab to the spreadsheet see which cell, row header, or column header has focus click on other cells or headers to change focus within the spreadsheet tab off the spreadsheet by pressing tab once tab back to the spreadsheet and automatically set focus to the previously focused cell or header inspect32 confirms that all of this really works; it's not just visual smoke and mirrors.
uri - Archive of obsolete content
ArchiveMozillaXULPropertyuri
when a rule is evaluated, it scans through each resource in the rdf datasource looking for a match.
...then, the other rules are evaluated for a match.
Actions - Archive of obsolete content
« previousnext » the content to generate in a template is specified using the <xul:action> element which should either be the next sibling of the <xul:query> element (if no rules need be specified) or be a direct child of a <xul:rule> element.
...ple.rdf" ref="http://www.xulplanet.com/rdf/a"> <template> <query> <content uri="?start"/> <triple subject="?start" predicate="http://www.xulplanet.com/rdf/relateditem" object="?relateditem"/> </query> <action> <button uri="?relateditem" label="?relateditem"/> </action> </template> </vbox> in this example, we omit the <xul:rule> element around the <xul:action> as it is optional when we want to generate content unconditionally.
Namespaces - Archive of obsolete content
gellan" gender="male"/> <person name="laura secord" gender="female"/> </people> <listbox datasources="people.xml" ref="*" querytype="xml"> <template xmlns:ns="www.example.com/people"> <query expr="ns:person"/> <action> <listitem uri="?" label="?ns:name"/> </action> </template> </listbox> once added to the template element the namespaces can then be referenced inside temple rule elements too, this works both in rdf and xml templates.
... <listbox datasources="people.xml" ref="*" querytype="xml"> <template xmlns:ns="www.example.com/people"> <query expr="ns:person"/> <rule ns:gender="male"> <label uri="?" label="?ns:name"/> </action> </template> </listbox> ...
Static Content - Archive of obsolete content
this demonstrates how the template builder generates content, and the specifics of how this is done become important when dealing with recursive content and multiple rules.
...this becomes useful when using multiple rules and we'll see some examples of this later.
Adding Style Sheets - Archive of obsolete content
(the selector is the part before the curly brace in a style rule).
... you can combine these rules in any way that you wish.
XPCOM Examples - Archive of obsolete content
we can use this as in the following example: example 1 : source <toolbox> <menubar id="windowlist-menubar"> <menu label="window"> <menupopup id="window-menu" datasources="rdf:window-mediator" ref="nc:windowmediatorroot"> <template> <rule> <menuitem uri="rdf:*" label="rdf:http://home.netscape.com/nc-rdf#name"/> </rule> </template> </menupopup> </menu> </menubar> </toolbox> a window menu will be created with a list of all the open windows.
... the example below shows how we might do this: <toolbox> <menubar id="windowlist-menubar"> <menu label="window" oncommand="switchfocus(event.target);"> <menupopup id="window-menu" datasources="rdf:window-mediator" ref="nc:windowmediatorroot"> <template> <rule> <menuitem uri="rdf:*" label="rdf:http://home.netscape.com/nc-rdf#name"/> </rule> </template> </menupopup> </menu> </menubar> </toolbox> <script> function switchfocus(elem) { var mediator = components.classes["@mozilla.org/rdf/datasource;1?name=window-mediator"].getservice(); mediator.queryinterface(components.interfaces.nsiwindowdatasource); var resource = elem.getat...
Using Remote XUL - Archive of obsolete content
in order to give them style we have to reference a stylesheet with rules for styling menus.
...</window> the xml-stylesheet processing instruction references a stylesheet, applying its rules to the widgets in the xul document into which it is placed.
XUL Questions and Answers - Archive of obsolete content
instead of <menulist id="abpopup"> <menupopup id="abpopup-menupopup" ref="moz-abdirectory://" datasources="rdf:addressdirectory" sortactive="true" sortdirection="ascending" sortresource="http://home.netscape.com/nc-rdf#dirtreenamesort"> <template> <rule nc:iswriteable="false"/> <rule nc:ismaillist="false"> <menuitem uri="..." label="rdf:http://home.netscape.com/nc-rdf#dirname" value="rdf:http://home.netscape.com/nc-rdf#diruri"/> </rule> <rule nc:ismaillist="true"> <menuitem uri="..." label="rdf:http://home.netscape.com/nc-rdf#dirname" value="rdf:http://home.netscape.com/nc...
...-rdf#diruri"/> </rule> </template> </menupopup> </menulist> it should be written as follows: <menulist id="abpopup22"> <menupopup id="abpopup-menupopup" ref="moz-abmdbdirectory://abook.mab" datasources="rdf:addressdirectory" sortactive="true" sortdirection="ascending" sortresource="http://home.netscape.com/nc-rdf#dirtreenamesort"> <template> <rule nc:iswriteable="false"/> <rule nc:ismaillist="true"> <menuitem uri="..." label="rdf:http://home.netscape.com/nc-rdf#dirname" value="rdf:http://home.netscape.com/nc-rdf#diruri"/> </rule> </template> </menupopup> </menulist> drawwindow with transparent background possible?
XUL element attributes - Archive of obsolete content
style type: css inline style css style rules to be applied to the element.
...it is preferred to put style rules in style sheets.
XUL Reference - Archive of obsolete content
iframe image key keyset label listbox listcell listcol listcols listhead listheader listitem member menu menubar menuitem menulist menupopup menuseparator notification notificationbox observes overlay page panel param popupset preference preferences prefpane prefwindow progressmeter query queryset radio radiogroup resizer richlistbox richlistitem row rows rule scale script scrollbar scrollbox scrollcorner separator spacer spinbuttons splitter stack statusbar statusbarpanel stringbundle stringbundleset tab tabbrowser (firefox-only starting with firefox 3/gecko 1.9) tabbox tabpanel tabpanels tabs template textnode textbox textbox (firefox autocomplete) textbox (mozilla autocomplete) timepicker titlebar toolbar toolbarbutton ...
...ocomplete) timepicker description label image listbox listitem listcell listcol listcols listhead listheader richlistbox richlistitem tree treecell treechildren treecol treecols treeitem treerow treeseparator box hbox vbox bbox deck stack grid columns column rows row scrollbox action assign binding bindings conditions content member param query queryset rule template textnode triple where script commandset command broadcaster broadcasterset observes key keyset stringbundle stringbundleset arrowscrollbox dropmarker grippy scrollbar scrollcorner spinbuttons all attributes all properties all methods attributes defined for all xul elements style classes event handlers deprecated/defunct markup ...
XUL accessibility guidelines - Archive of obsolete content
in cases where duplication of functionality is not possible (such as a window without a menu bar), toolbar buttons can be made focusable by adding the special css rule -moz-user-focus: normal.
...as a general rule, elements set to scroll are inaccessible if the user cannot scroll to all the content using the keyboard.
action - Archive of obsolete content
the action should be contained within a query or rule element.
...for a matched rule, each variable will be a reference to data within the datasource, determined from the query.
Extentsions FAQ - Archive of obsolete content
are there any fundamental rules related to threading in xpcom, and if so, where are these defined?
... could there be more than two images to reflect more than two states?does the rules in the css file have to be in any particular order (if two rules match, which is chosen)?
Introduction to Public-Key Cryptography - Archive of obsolete content
ssl protocol signed and encrypted email single sign-on object signing ssl protocol the secure sockets layer (ssl) protocol is a set of rules governing server authentication, client authentication, and encrypted communication between servers and clients.
... the rules governing the construction of dns can be quite complex and are beyond the scope of this document.
Building a Theme - Archive of obsolete content
to change its style within our theme, we need to write a selector rule to select this class.
...search this file for the #navigator-toolbox selector, and add a background: orange; rule to it.
Theme changes in Firefox 3 - Archive of obsolete content
the rule that's needed to show and hide the go button and other location bar icons is: #urlbar[pageproxystate="invalid"] > #urlbar-icons > :not(#go-button) , #urlbar[pageproxystate="valid"] > #urlbar-icons > #go-button { visibility: collapse; } images to add add the following images: chrome://global/skin/icons/information-16.png used when presenting information notices.
... mac os x mac os x themes for firefox 3 should add these two rules to the end of chrome://global/skin/wizard.css: .wizard-buttons-btm { padding:xpx; } .wizard-label-box { display: none; } the numeric value ofx, the number of pixels of padding in .wizard-buttons-btm, should be the same as the value of the margin for .wizard-buttons-box-2.
Using IO Timeout And Interrupt On NT - Archive of obsolete content
the only reliable way to cancel outstanding overlapped io request that works on both nt 3.51 and 4.0 is to close the file descriptor, hence the rule of thumb stated at the beginning of this memo.
...following the rule of thumb, both threads would close the socket.
Using the W3C DOM - Archive of obsolete content
manipulating document style and content changing an element's style using the dom the following table describes standards-based methods for accessing and updating style rules defined for various html elements in a web page.
... css 1 forward-compatible parsing css 2.1 rules for handling parsing errors changing an element's text using the dom the text of an element is available as the textcontent or innertext property (some browsers support both).
::-ms-value - Archive of obsolete content
the ::-ms-value css pseudo-element is a microsoft extension that applies rules to the value of a text or password <input> control or the content of a <select> control.
... allowable properties only the following css properties can be used in a rule with ::-ms-value in its selector.
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
following standards is certainly not a new organizational phenomenon; organizations require their employees to follow common rules, or a common set of standards all the time.
...when auditors evaluate an organizations financial health, they do so by following the fasb rules.
Selector (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
a css selector is the part of a css rule that describes what elements in a document the rule will match.
... the matching elements will have the rule's specified style applied to them.
Descriptor (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
a css descriptor defines the characteristics of an at-rule.
... at-rules may have one or multiple descriptors.
ITU - MDN Web Docs Glossary: Definitions of Web-related terms
the international telecommunication union (itu) is the organization authorized by the united nations to establish standards and rules for telecommunication, including telegraph, radio, telephony and the internet.
... from defining rules for ensuring transmissions get to where they need to go to and creating the "sos" alert signal used in morse code, the itu has long played a key role in how we use technology to exchange information and ideas.
Normative - MDN Web Docs Glossary: Definitions of Web-related terms
normative is a word commonly used in software specifications to denote sections that are standardized and must be followed as a rule.
... specifications might also contain sections that are marked as non-normative or informative, which means those are provided there for the purpose of helping the reader understand the specifications better or to showcase an example or best practice, which need not be followed as a rule.
SEO - MDN Web Docs Glossary: Definitions of Web-related terms
crawlers follow rules.
... if you follow those rules closely when doing seo for a website, you give the site the best chances of showing up among the first results, increasing traffic and possibly revenue (for ecommerce and ads).
Syntax - MDN Web Docs Glossary: Definitions of Web-related terms
syntax generally includes grammar and the rules that apply to writing it, such as indentation requirements in python.
...although languages can share few similarities in terms of their syntaxes for example "operand operator operand" rule in javascript and python.
Protocol - MDN Web Docs Glossary: Definitions of Web-related terms
a protocol is a system of rules that define how data is exchanged within or between computers.
...the set of rules that defines a format is called a protocol.
Assessment: Accessibility troubleshooting - Learn web development
note: you'll need to update the css rule selectors that style the tags to their proper equivalents for the semantic headings.
...note that you'll need to update some of the css rule as well.
CSS and JavaScript accessibility best practices - Learn web development
the rule of thumb is that you can update the styling of a page feature to fit in your design, but don't change it so much that it no longer looks or behaves as expected.
...there is no rule that says all content has to be 100% accessible to all people — you just need to do what you can, and make your apps as accessible as possible.
Test your skills: Multicol - Learn web development
the aim of this task is to get you working with the css column-count, column-width, column-gap, column-span and column-rule properties and values covered in our lesson on multiple-column layout.
... then, add a 5px, grey rule between each column, ensuring there is 10px of space between the edge of the rule and the column content.
Using CSS generated content - Learn web development
to specify this, make a rule and add ::before or ::after to the selector.
... this rule adds a space and an icon after every link that has the class glossary: html <a href="developer.mozilla.org" class="glossary">developer.mozilla.org</a> css a.glossary::after { content: " " url("https://mdn.mozillademos.org/files/16322/glossary-icon.gif"); } ...
What do common web layouts contain? - Learn web development
we have over 25 years' experience and we'll give you some common rules of thumb to help you design your site.
... these are rules of thumb you can draw on.
What is a URL? - Learn web development
each web server has its own rules regarding parameters, and the only reliable way to know if a specific web server is handling parameters is by asking the web server owner.
... note: there are some extra parts and some extra rules regarding urls, but they are not relevant for regular users or web developers.
What is a web server? - Learn web development
a protocol is a set of rules for communication between two computers.
...(we'll cover that sort of technology in other articles.) http provides clear rules for how a client and server communicate.
HTML forms in legacy browsers - Learn web development
make things simple because html forms involves complex interaction, there is one rule of thumb: keep it simple, also known as the "kiss principal".
... input { /* this rule turns off the default rendering for the input types that have a border, including buttons defined with an input element */ border: 1px solid #ccc; } input[type="button"] { /* this does not restore the default rendering */ border: none; } input[type="button"] { /* these don't either!
How to structure a web form - Learn web development
for="username"> <span>name:</span> <input id="username" type="text" name="username"> <abbr title="required" aria-label="required">*</abbr> </label> </div> <!-- but this is probably best: --> <div> <label for="username">name: <abbr title="required" aria-label="required">*</abbr></label> <input id="username" type="text" name="username"> </div> the paragraph at the top states a rule for required elements.
... the rule must be included before it is used so that sighted users and users of assistive technologies such as screen readers can learn what it means before they encounter a required element.
UI pseudo-classes - Learn web development
ite; background-color: black; content: "required"; left: -70px; } input:out-of-range + span::after { color: white; background-color: red; width: 155px; content: "outside allowable value range"; left: -182px; } this is a similar story to what we had before in the :required example, except that here we've split out the declarations that apply to any ::after content into a separate rule, and given the separate ::after content for :required and :out-of-range states their own content and styling.
...because the :out-of-range rule appears later in the source code than the :required rule, the cascade rules come into play, and the out of range message is shown.
JavaScript basics - Learn web development
there are other rules for when you should and shouldn't use semicolons.
...(see this section about naming rules.) if you are unsure, you can check your variable name to see if it's valid.
The web and web standards - Learn web development
cascading style sheets (css) is a rule-based language used to apply styles to your html, for example setting text and background colors, adding borders, animating things, or laying out a page in a certain way.
... so-called "linters", which take a set of rules, look at your code, and highlight places where you haven't followed the rules properly.
Debugging HTML - Learn web development
browsers have built-in rules to state how to interpret incorrectly written markup, so you'll get something running, even if it is not what you expected.
... "end tag strong violates nesting rules": this points out the incorrectly nested elements, and the line/column information points out where they are.
Document and website structure - Learn web development
line breaks and horizontal rules two elements that you'll use occasionally and will want to know about are <br> and <hr>: <br> creates a line break in a paragraph; it is the only way to force a rigid structure in a situation where you want a series of fixed short lines, such as in a postal address or a poem.
... was a man named o'dell<br> who loved to write html<br> but his structure was bad, his semantics were sad<br> and his markup didn't read very well.</p> without the <br> elements, the paragraph would just be rendered in one long line (as we said earlier in the course, html ignores most whitespace); with <br> elements in the code, the markup renders like this: <hr> elements create a horizontal rule in the document that denotes a thematic change in the text (such as a change in topic or scene).
Build your own function - Learn web development
note: for function naming conventions, you should follow the same rules as variable naming conventions.
...} rule: padding-left: 82px; background-position: 25px center; background-repeat: no-repeat; now we need to add code to our displaymessage() function to handle displaying the icons.
Client-Server Overview - Learn web development
the web server detects that the request is "dynamic" and forwards it to the web application for processing (the web server determines how to handle different urls based on pattern matching rules defined in its configuration).
... the web server loads static files from the file system and returns them to the browser directly (again, correct file handling is based on configuration rules and url pattern matching).
Starting our Svelte Todo list app - Learn web development
the accessibility rules checked by svelte are taken from eslint-plugin-jsx-a11y, a plugin for eslint that provides static checks for many accessibility rules on jsx elements.
...you can check the meaning of each rule by clicking on its link.
Client-side tooling overview - Learn web development
code formatters code formatters are somewhat related to linters, except that rather than point out errors in your code, they usually tend to make sure your code is formatted correctly, according to your style rules, ideally automatically fixing errors that they find.
...for example: sass/scss: this css extension allows you to use variables, nested rules, mixins, functions, and many other features, some of which are available in native css (such as variables), and some of which aren't.
Command line options
syntax rules but first, let's describe the syntax rules that apply for all options.
...see syntax rules.
Creating a spell check dictionary add-on
sion>22.0</em:maxversion> </description> </em:targetapplication> <!-- seamonkey --> <em:targetapplication> <description> <em:id>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</em:id> <em:minversion>2.15a1</em:minversion> <em:maxversion>2.49</em:maxversion> </description> </em:targetapplication> </description> </rdf> there are some rules about how you should adapt the install.rdf file: if you are creating a new dictionary add-on, we recommend that the em:id consists of your locale code followed by @dictionaries.addons.mozilla.org, but if there is more than one dictionary for your language (for example the german "old spelling" versus "new spelling" dictionaries), you may need to choose another id, that follows the rules of em...
... the em:version should follow the rules of mozilla add-on version numbers, and if you update an existing dictionary add-on, the new version number must be greater than the old one.
Interface Compatibility
the rules which govern interface changes are different depending on the consumers and the languages involved.
...one exception to this rule is apis which are explicitly shipped with mozilla prefixes as a technology preview.
Security best practices for Firefox front-end engineers
linter rules against unsanitized dom interaction the security assurance team maintains an eslint rule that disallows unsafe uses of innerhtml and similar dom apis.
...developers are able to avoid tripping the rule by using escaping functions in combination with template strings, for example: bar.innerhtml = escapehtml`<a href='${url}'>about</a>`; in system-privileged chrome code, any kind of remaining scripts will still be removed by our sanitizer.
Getting Started with Chat
the general rules and etiquette are still useful for our new home.
... general rules and etiquette once you have your client set up (see software below) and are connected, there are some basic rules you should follow to ensure the most enjoyable and productive experience: as with all mozilla forums and events, agreeing to our community participation guidelines is a requirement for participation.
How to add a build-time test
for standalone executables, if one sets up the right variables, then the rules.mk file will do lots of magic and most of the heavy lifting.
... note that the following variables are supplied by the rules.mk file: cppsrcs, simple_programs, run_test_program.
Introduction to Layout in Mozilla
e style set object, who in turn passes to the frame constructor frame constructor creates frames constructframeinternal recursively walks content tree, resolves style and creates frames either created by tag (<select>) or by display type (<p>) frame manager maintains mapping from content to frame style resolution compute stylistic information based on the style rules that apply for the frame’s content node style data broken into different structures display, visibility, font, color, background, … inherit vs.
...invalid content) - harishd events - saari, joki block-and-line reflow - waterson, dbaron table reflow - karnaze form controls - rods, bryner style resolution and rule tree - dbaron views, widgets, and painting - roc, kmcclusk editor - kin, jfrancis xul and box layout - hewitt, ben xbl - hewitt, ben conclusion data flow key data structures detailed walk-through incrementalism q & a?
Writing localizable code
there are few exceptions to this rule, but in general, the localized file should comply with standards and should not require build tools to be transformed.
... l10n impact on frozen trees, there is the rule to not check in l10n-impact changes.
Fonts for Mozilla 2.0's MathML engine
finally, include the mathml-fonts/resource/mathml.css style sheet in your web pages, for example by adding the following rule to the default style sheet of your web site: @import url('/path/to/resource/mathml.css'); browsers have default font-families in their user agent stylesheets.
...for example to force the use of stix fonts: math { font-family: stixgeneral; } ::-moz-math-stretchy { font-family: stixnonunicode, stixsizeonesym, stixsize1, stixgeneral; } try the mathml torture test to compare the rendering of various fonts and the css rules to select them.
Mozilla Quirks Mode Behavior
miscellaneous & style all of the style rules in layout/style/res/quirk.css apply only in quirks mode: orphaned li has an inside bullet (bug 1049).
...should look into tablequirkcolorrule, re-describe, and figure out when it changed.] obsolete since gecko 37 the empty-cells property defaulted to hide in quirks mode but show (according to css2.1) in standards mode (see bug 33244) (though the correct fix would be to specify it on the html table element in quirk.css).
Optimizing Applications For NSPR
the only exception to this rule is the <tt>select()</tt> and <tt>poll()</tt> system calls on unix, both of which nspr has overridden to make sure they are aware of the nspr local threads.
... the general rules of 16 bit large model memory restrictions apply to applications using nspr on windows 3.1.
NSS 3.12.4 release notes
cert_decodecrlissuingdistributionpoint cert_findcrlissuingdistpointexten the old documentation of the expression matching syntax rules was incorrect, and the new corrected documentation is as follows for public nssutil functions (see portreq.h): port_regexpvalid port_regexpsearch port_regexpcasesearch these functions will match a string with a shell expression.
...expected return values: non_sxp if exp is a standard string invalid_sxp if exp is a shell expression, but invalid valid_sxp if exp is a valid shell expression expression matching rules: * matches anything ?
Property cache
if there come to be more than 224 objects that need distinct shapes, the shape rules can no longer be satisfied.
...with regard to property attributes, getters, setters, and so forth, the property cache entry must take into account several rules documented at js_setproperty.
JS_GetParent
the typical rule is that every object is in the same security domain as its parent.
... (but each application can define its own security rules.
JS_LookupProperty
when executing javascript code that uses properties, spidermonkey looks up properties using slightly different rules depending on the syntactic context in which the property name appears.
... (the javascript engine simply passes these flags through to the object when it calls the object's jsclass.resolve callback, so objects of a custom jsclass may interpret these flags however they like.) if flags is 0, js_lookuppropertywithflags uses the default lookup rules, the ones used by js_lookupproperty.
Redis Tips
ok, now in a different shell, and another redis-cli, do this: redis2> rpush myqueue 42 now if you look back at the first redis-cli, you'll see that it immediately popped the value off the list and said something like: redis1> 1) "myqueue" 2) "42" (26.87s) that rules!
... as a rule, the name of the optional argument is given as a string in the node function call.
Signing Mozilla apps for Mac OS X
--resource-rules /path/to/coderesources specifies a file to use when generating the rules to be applied to the code signing.
... codesign -s mac-testing -fv \ --keychain /users/user/library/keychains/mykeychain.keychain \ --resource-rules ./application.app/contents/_codesignature/coderesources \ --requirements '=designated => identifier "org.you.yourapp" and ( (anchor apple generic and certificate leaf[field.1.2.840.113635.100.6.1.9] ) or (anchor apple generic and certificate 1[field.1.2.840.113635.100.6.2.6] and certificate leaf[field.1.2.840.113635.100.6.1.13] and certificate leaf[subject.ou] = "43aq936h96"))' \ ...
XPCOM array guide
MozillaTechXPCOMGuideArrays
array guidelines here are a few simple rules which will keep your code clean and your developers happy: use typesafe arrays like nscomarray<t> nstarray<t> wherever possible.
... // no need for the double-pointer, and this violates xpcom rules // which expect acess to a new object void tweakarray(nsimutablearray** elements) { // ugh, extra indirection!
Mozilla internal string guide
nssubstringtuple - created via string concatenation nsdependentsubstring - created through substring nspromiseflatstring - created through promiseflatstring() nsliteral[c]string - created through the ""_ns and u""_ns user-defined literals of course, there are times when it is necessary to reference these string classes in your code, but as a general rule they should be avoided.
... string guidelines follow these simple rules in your code to keep your fellow developers, reviewers, and users happy.
RefPtr
the rules are simple: use nscomptr to hold pointers to xpcom interfaces, and use refptr to hold pointers to concrete class, even if the concrete class implements one or more xpcom interfaces.
...bug 756640 is on file to enforce this rule but hasn't yet been fixed.
nsIEffectiveTLDService
the methods below implement the public suffix algorithm in full, including the implicit "*" rule.
... therefore, if you call getpublicsuffix("a.b.c.nonexistent"), you will get back "nonexistent" - this "tld" is not in the public suffix list, but the implicit "*" rule means that it is returned.
nsIMsgFilter
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgfilter.idl attributes type attribute nsmsgruleactiontype type; priority // target priority..
... arbitraryheader ) appendterm() void nsimsgfilter::appendterm (in nsimsgsearchterm term) createterm() nsimsgsearchterm nsimsgfilter::createterm ( ) matchhdr() void nsimsgfilter::matchhdr ( in nsimsgdbhdr msghdr, in nsimsgfolder folder, in nsimsgdatabase db, in string headers, in unsigned long headersize, out boolean result ) logrulehit() void nsimsgfilter::logrulehit ( in nsimsgruleaction afilteraction, in nsimsgdbhdr aheader ) createaction() nsimsgruleaction nsimsgfilter::createaction ( ) getactionat() nsimsgruleaction nsimsgfilter::getactionat (in long aindex) appendaction() void nsimsgfilter::appendaction (in nsimsgruleaction action ) clearactionlist() void nsimsgfilter::clearactionlist() ...
nsIStyleSheetService
a user sheet loaded via this api will come before usercontent.css and userchrome.css in the cascade (so the rules in it will have lower precedence than rules in those sheets).
... an agent sheet loaded via this api will come after ua.css in the cascade (so the rules in it will have higher precedence than rules in ua.css).
nsIURI
other parts are url-escaped per the rules of rfc3986.
...setting the spec causes the new spec to be parsed using the rules for the scheme the uri currently has.
XPCOM Interface Reference
summaryobservernsimicrosummaryservicensimicrosummarysetnsimimeconverternsimimeheadersnsimodulensimsgaccountnsimsgaccountmanagerextensionnsimsgcompfieldsnsimsgcustomcolumnhandlernsimsgdbhdrnsimsgdbviewnsimsgdbviewcommandupdaternsimsgdatabasensimsgfilternsimsgfiltercustomactionnsimsgfilterlistnsimsgfoldernsimsgheaderparsernsimsgidentitynsimsgincomingservernsimsgmessageservicensimsgprotocolinfonsimsgruleactionnsimsgsearchcustomtermnsimsgsearchnotifynsimsgsearchscopetermnsimsgsearchsessionnsimsgsearchtermnsimsgsearchvaluensimsgsendlaternsimsgthreadnsimsgwindownsimsgwindowcommandsnsimutablearraynsinavbookmarkobservernsinavbookmarksservicensinavhistorybatchcallbacknsinavhistorycontainerresultnodensinavhistoryfullvisitresultnodensinavhistoryobservernsinavhistoryquerynsinavhistoryqueryoptionsnsinavhis...
...exceptionnsixsltprocessornsixsltprocessorobsoletensixulappinfonsixulbrowserwindownsixulbuilderlistenernsixulruntimensixulsortservicensixultemplatebuildernsixultemplatequeryprocessornsixultemplateresultnsixulwindownsixmlrpcclientnsixmlrpcfaultnsizipentrynsizipreadernsizipreadercachensizipwriternsmsgfilterfileattribvaluensmsgfolderflagtypensmsgjunkstatusnsmsgkeynsmsglabelvaluensmsgpriorityvaluensmsgruleactiontypensmsgsearchattribnsmsgsearchopnsmsgsearchscopensmsgsearchtermnsmsgsearchtypevaluensmsgsearchvaluensmsgsearchwidgetvaluenspipromptservice see also interfaces grouped by function ...
Reference Manual
these rules apply equally to the "assignment" that happens when copying parameters or function results that are declared to be nscomptrs.
...once upon a time, there was, but it went away for three reasons: it is against the rules of xpcom for a getter to return a non-addrefed interface pointer through a parameter (if you see it, report a bug).
Using the Gecko SDK
a frozen gecko api is one that is included in the gecko and marked frozen with the text <tt>@status frozen</tt> (with nspr as the exception to the rule).
...(note: nspr is the one exception to this rule.
Autoconfiguration in Thunderbird
you can add a rewriterule in the default virtual host (on debian /etc/apache2/sites-enabled/000-default) to match all autoconfig.* subdomains: <virtualhost *:80> #must be the first virtual host serveradmin webmaster@hoster.com servername www documentroot /var/www rewriteengine on rewritecond %{http_host} ^autoconfig\.
... [nc] rewriterule ^/(.*) http://autoconfig.hoster.com/$1 [l,r=301,ne] #...
Thunderbird Configuration Files
userchrome.css this file sets the display rules for various elements in the thunderbird user interface and is located in the sub-folder called chrome in your profile folder.
... usercontent.css this file sets the display rules for web content and is located in the sub-folder called chrome in your profile folder.
Toolkit version format
a few examples of valid version parts: 0 (as in 1.0): <number-a>=0 5a (as in 1.5a): <number-a>=5, <string-b>=a 5pre4 (as in 3.5pre4): <number-a>=5, <string-b>=pre, <number-c>=4 * (as in 1.0.*): <string-b>=* a few special parsing rules are applied for backwards compatibility and readability: if the version part is a single asterisk, it is interpreted as an infinitely-large number: 1.5.0.* is the same as 1.5.0.(infinity) if string-b is a plus sign, number-a is incremented to be compatible with the firefox 1.0.x version format: 1.0+ is the same as 1.1pre the rationale behind splitting a version part into a sequence of ...
... see maintenance policy for special rules that mark version as "beta" in the amo queues.
Type conversion
ystructtype", [ { "v": ctypes.int16_t.ptr } ])(); mystruct.v = ctypes.int16_t.array(10)(); console.log(mystruct.v.tostring()); // 'ctypes.int16_t.ptr(ctypes.uint64("0x11d6ff400"))' mystruct.v = null; console.log(mystruct.v.tostring()); // 'ctypes.int16_t.ptr(ctypes.uint64("0x0"))' mystruct.v = ctypes.int32_t.array(10)(); // throws error only in functiontype argument, the following rules are also applied: target type source converted value ctypes.char.ptr js string pointer to temporary allocated null-terminated utf8 string ctypes.signed_char.ptr ctypes.unsigned_char.ptr ctypes.char16.ptr js string pointer to temporary allocated null-terminated utf16 string any pointer types any arraybuffer object poin...
...ly if the object has properties for all fields and no other properties) implicitly convert each enumerable property to corresponding field explicit convert in js-ctypes, data could be converted explicitly, when passing to cdata constructor: ctypes.int32_t("123"); // string "123" is parsed as 10-base string explicit convert tries implicit convert first, and if it fails, the following rules are applied: boolean type target type source converted value ctype.bool js value toboolean(src) console.log(ctypes.bool("123").tostring()); // 'ctypes.bool(true)' console.log(ctypes.bool("").tostring()); // 'ctypes.bool(false)' integer types target type source converted value any integer types js number except -infinity, inf...
Edit Shape Paths in CSS - Firefox Developer Tools
activate / deactivate the shape path editor the shape path editor is accessed via the css rules panel, which can be opened as described in the guide to opening the inspector.
... in the rules panel you can see the values for circle() change as you edit the shape.
View background images - Firefox Developer Tools
in the rules view, you can see a preview of images specified using background-image.
... just hover over the rule: from firefox 41, if you right-click the image declaration, you'll see an option to copy the image as a data: url: ...
Settings - Firefox Developer Tools
if common preferences is not included in the settings, web console logs can be persisted by using the 'about:config' url in browser address bar, searching for: 'devtools.webconsole.persistlog' then toggling this value to true inspector show browser styles a setting to control whether styles applied by the browser (user-agent styles) should be displayed in the inspector's rules view.
...with this setting checked, the page inspector rules view will also provide links to the original sources.
AudioNode.channelInterpretation - Web APIs
when the number of channels doesn't match between an input and an output, up- or down-mixing happens according the following rules.
... this can be somewhat controlled by setting the audionode.channelinterpretation property to speakers or discrete: interpretation input channels output channels mixing rules speakers 1 (mono) 2 (stereo) up-mix from mono to stereo.
CSS.supports() - Web APIs
WebAPICSSsupports
return value true if the browser supports the rule, otherwise false.
...tyle", "blink"); result = css.supports("display: flex"); result = css.supports("(--foo: red)"); result = css.supports(`(transform-style: preserve) or (-moz-transform-style: preserve) or (-o-transform-style: preserve) or (-webkit-transform-style: preserve)`); // result is true or false specification specification status comment css conditional rules module level 3the definition of 'css: supports()' in that specification.
CSSStyleDeclaration.cssText - Web APIs
to be able to set a stylesheet rule dynamically, see using dynamic styling information.
... not to be confused with stylesheet style-rule cssrule.csstext.
CSS Object Model (CSSOM) - Web APIs
reference animationevent caretposition css csscharsetrule cssconditionrule csscounterstylerule cssfontfacerule cssfontfeaturevaluesmap cssfontfeaturevaluesrule cssgroupingrule cssimportrule csskeyframerule csskeyframesrule cssmarginrule cssmediarule cssnamespacerule csspagerule cssrule cssrulelist cssstyledeclaration cssstylesheet cssstylerule csssupportsrule cssvariablesmap cssviewportrule elementcssinlinestyle fontface fontfaceset fontfacesetloadevent geometryutils getstyleutils linkstyle medialist mediaquerylist mediaquerylistevent mediaquerylis...
... screen orientation api working draft css fonts module level 3 candidate recommendation css animations working draft css transitions working draft css custom properties for cascading variables module level 1 candidate recommendation css conditional rules module level 3 candidate recommendation defined the css interface.
Basic usage of canvas - Web APIs
these rules, however, don't affect the actual drawing on the canvas.
...when no styling rules are applied to the canvas it will initially be fully transparent.
Document.requestStorageAccess() - Web APIs
check any additional rules that the browser has.
...reject if some rule is not fulfilled.
FetchEvent.respondWith() - Web APIs
for security reasons, there are a few global rules: you can only return response objects of type "opaque" if the fetchevent.request object's mode is "no-cors".
... exceptions exception notes networkerror a network error is triggered on certain combinations of fetchevent.request.mode and response.type values, as hinted at in the "global rules" listed above.
Guide to the Fullscreen API - Web APIs
presentation differences it's worth noting a key difference here between the gecko and webkit implementations at this time: gecko automatically adds css rules to the element to stretch it to fill the screen: "width: 100%; height: 100%".
...to get the same fullscreen behavior in webkit, you need to add your own "width: 100%; height: 100%;" css rules to the element yourself: #myvideo:-webkit-full-screen { width: 100%; height: 100%; } on the other hand, if you're trying to emulate webkit's behavior on gecko, you need to place the element you want to present inside another element, which you'll make fullscreen instead, and use css rules to adjust the inner element to match the appearance you want.
HTMLTableElement - Web APIs
htmltableelement.rules is a domstring containing the type of the internal borders of the table.
... it reflects the obsolete rules attribute and can take one of the following values: "none", "groups", "rows", "cols", or "all".
MediaDevices.getUserMedia() - Web APIs
for additional details on these requirements and rules, how they are reflected in the context in which your code is running, and about how browsers manage user privacy and security issues, read on.
... of equal importance are the rules around notification.
MediaStreamAudioSourceNode - Web APIs
it has been replaced with the more predictable mediastreamtrackaudiosourcenode, which has better-defined rules for how it chooses the track to output.
... however, it's important to note that the rule establishing this ordering was added long after this interface was first introduced into the web audio api.
SVGGeometryElement - Web APIs
normal hit testing rules apply; the value of the pointer-events property on the element determines whether a point is considered to be within the fill.
...normal hit testing rules apply; the value of the pointer-events property on the element determines whether a point is considered to be within the stroke.
msManipulationViewsEnabled - Web APIs
the msmanipulationviewsenabled read-only property returns true if manipulation features are support available, such as touch panning and zooming using css rules.
... value returns true if manipulation features are support available, such as touch panning and zooming using css rules.
Basic concepts behind Web Audio API - Web APIs
1: r: right quad 0: l: left 1: r: right 2: sl: surround left 3: sr: surround right 5.1 0: l: left 1: r: right 2: c: center 3: lfe: subwoofer 4: sl: surround left 5: sr: surround right up-mixing and down-mixing when the number of channels doesn't match between an input and an output, up- or down-mixing happens according the following rules.
... this can be somewhat controlled by setting the audionode.channelinterpretation property to speakers or discrete: interpretation input channels output channels mixing rules speakers 1 (mono) 2 (stereo) up-mix from mono to stereo.
ARIA Test Cases - Accessibility
markup used: role="listbox", "option" (listitem should only be used with list, which is for static document structures, could someone please make sure our examples follow this rule) aria-activedescendant notes: results: at firefox ie opera safari jaws 9 - - n/a n/a jaws 10 - - - - voiceover (leopard) n/a n/a - fail window-eyes - - - - nvda - n/a - - zoom (leopard) pass n/a pass pass zoomtext - - - - ...
...note: if this does not work, it means the browser is exposing the children instead of respecting the "children presentational: true" rule for sliders as the user moves the slider, the new value is spoken markup used: role="slider" aria-valuemin, aria-valuenow, aria-valuemax notes: results: at firefox ie opera safari jaws 9 - - n/a n/a jaws 10 - - - - voiceover (leopard) n/a n/a - fail window-eyes - - - - nvda...
ARIA: gridcell role - Accessibility
<div role="row"> <div role="gridcell">jane</div> <div role="gridcell">smith</div> <div role="gridcell">496-619-5098</div> … </div> the first rule of aria is if a native html element or attribute has the semantics and behavior you require, use it instead of re-purposing an element and adding aria.
... best practices the first rule of aria is: if a native html element or attribute has the semantics and behavior you require, use it instead of re-purposing an element and adding an aria role, state or property to make it accessible.
ARIA: checkbox role - Accessibility
<span role="checkbox" aria-checked="false" tabindex="0" aria-labelledby="chk1-label"> </span> <label id="chk1-label">remember my preferences</label> the first rule of aria is if a native html element or attribute has the semantics and behavior you require, use it instead of re-purposing an element and adding aria.
... best practices the first rule of aria is: if a native html element or attribute has the semantics and behavior you require, use it instead of re-purposing an element and adding an aria role, state or property to make it accessible.
Cognitive accessibility - Accessibility
headings are more obvious navigational aids compared to other methods to identify page content sections (borders, whitespace, horizontal rules, etc.).
...a good rule to go by is to make content simple enough that it can be understood the first time.
HTML To MSAA - Accessibility
this table reflects mapping rules for specific elements only, it doesn't reflect any general rules applicable to all elements.
... for example, if name column has n/a value then it means specific elements doesn't provide own rules to calculate name but name can be computed from aria markup or @title attribute.
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
second, they can mishandle the object if it cannot parse the whitespace according to its own rules.
... windowfromaccessibleobject depends on client-window relationship problem: unless certain rules are followed, windowfromaccessibleobject will break, causing the failure of accessibility testing tools like accexplore.exe, and assistive technologies which require knowledge of the window class to know what app-specific configurations to run.
Accessibility documentation index - Accessibility
this table reflects mapping rules for specific elements only, it doesn't reflect any general rules applicable to all elements.
... for example, if name column has n/a value then it means specific elements doesn't provide own rules to calculate name but name can be computed from aria markup or @title attribute.
:-moz-ui-invalid - CSS: Cascading Style Sheets
this pseudo-class is applied according to the following rules: if the control does not have focus, and the value is invalid, apply this pseudo-class.
... if the element is required, the preceding rules apply only if the user has changed the value or attempted to submit the form.
:-moz-ui-valid - CSS: Cascading Style Sheets
this pseudo-class is applied according to the following rules: if the control does not have focus, and the value is valid, apply this pseudo-class.
... if the element is required, the preceding rules apply only if the user has changed the value or attempted to submit the form.
:host() - CSS: Cascading Style Sheets
WebCSS:host()
in this example we have a simple custom element — <context-span> — that you can wrap around text: <h1>host selectors <a href="#"><context-span>example</context-span></a></h1> inside the element's constructor, we create style and span elements, fill the span with the content of the custom element, and fill the style element with some css rules: let style = document.createelement('style'); let span = document.createelement('span'); span.textcontent = this.textcontent; const shadowroot = this.attachshadow({mode: 'open'}); shadowroot.appendchild(style); shadowroot.appendchild(span); style.textcontent = 'span:hover { text-decoration: underline; }' + ':host-context(h1) { font-style: italic; }' + '...
...:host-context(h1):after { content: " - no links in headers!" }' + ':host-context(article, aside) { color: gray; }' + ':host(.footer) { color : red; }' + ':host { background: rgba(0,0,0,0.1); padding: 2px 5px; }'; the :host(.footer) { color : red; } rule styles all instances of the <context-span> element (the shadow host in this instance) in the document that have the footer class set on them — we've used it to give instances of the element inside the <footer> a special color.
:host-context() - CSS: Cascading Style Sheets
in this example we have a simple custom element — <context-span> — that you can wrap around text: <h1>host selectors <a href="#"><context-span>example</context-span></a></h1> inside the element's constructor, we create style and span elements, fill the span with the content of the custom element, and fill the style element with some css rules: let style = document.createelement('style'); let span = document.createelement('span'); span.textcontent = this.textcontent; const shadowroot = this.attachshadow({mode: 'open'}); shadowroot.appendchild(style); shadowroot.appendchild(span); style.textcontent = 'span:hover { text-decoration: underline; }' + ':host-context(h1) { font-style: italic; }' + '...
...:host-context(h1):after { content: " - no links in headers!" }' + ':host-context(article, aside) { color: gray; }' + ':host(.footer) { color : red; }' + ':host { background: rgba(0,0,0,0.1); padding: 2px 5px; }'; the :host-context(h1) { font-style: italic; } and :host-context(h1):after { content: " - no links in headers!" } rules style the instance of the <context-span> element (the shadow host in this instance) inside the <h1>.
:host - CSS: Cascading Style Sheets
WebCSS:host
in this example we have a simple custom element — <context-span> — that you can wrap around text: <h1>host selectors <a href="#"><context-span>example</context-span></a></h1> inside the element's constructor, we create style and span elements, fill the span with the content of the custom element, and fill the style element with some css rules: let style = document.createelement('style'); let span = document.createelement('span'); span.textcontent = this.textcontent; const shadowroot = this.attachshadow({mode: 'open'}); shadowroot.appendchild(style); shadowroot.appendchild(span); style.textcontent = 'span:hover { text-decoration: underline; }' + ':host-context(h1) { font-style: italic; }' + '...
...:host-context(h1):after { content: " - no links in headers!" }' + ':host-context(article, aside) { color: gray; }' + ':host(.footer) { color : red; }' + ':host { background: rgba(0,0,0,0.1); padding: 2px 5px; }'; the :host { background: rgba(0,0,0,0.1); padding: 2px 5px; } rule styles all instances of the <context-span> element (the shadow host in this instance) in the document.
:not() - CSS: Cascading Style Sheets
WebCSS:not
for example, :not(*) matches any element which is not an element, which is obviously nonsense, so the accompanying rule will never be applied.
... this pseudo-class can increase the specificity of a rule.
prefix - CSS: Cascading Style Sheets
the prefix descriptor of the @counter-style rule specifies content that will be prepended to the marker representation.
... formal definition related at-rule@counter-styleinitial value"" (the empty string)computed valueas specified formal syntax <symbol>where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
suffix - CSS: Cascading Style Sheets
the suffix descriptor of the@counter-style rule specifies content that will be appended to the marker representation.
... formal definition related at-rule@counter-styleinitial value".
symbols - CSS: Cascading Style Sheets
it is used within the @counter-style at-rule.
... formal definition related at-rule@counter-styleinitial valuen/acomputed valueas specified formal syntax <symbol>+where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
font-family - CSS: Cascading Style Sheets
the font-family css descriptor allows authors to specify the font family for the font specified in an @font-face rule.
... formal definition related at-rule@font-faceinitial valuen/a (required)computed valueas specified formal syntax <family-name>where <family-name> = <string> | <custom-ident>+ examples setting the font family name @font-face { font-family: examplefont; src: url('examplefont.ttf'); } specifications specification status comment css fonts module level 3the definition of 'font-family' in that specification.
font-stretch - CSS: Cascading Style Sheets
the font-stretch css descriptor allows authors to specify a normal, condensed, or expanded face for the fonts specified in the @font-face rule.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.8 | w3c understanding wcag 2.0 formal definition related at-rule@font-faceinitial valuenormalcomputed valueas specified formal syntax <font-stretch-absolute>{1,2}where <font-stretch-absolute> = normal | ultra-condensed | extra-condensed | condensed | semi-condensed | semi-expanded | expanded | extra-expanded | ultra-expanded | <percentage> examples setting a percentage range for font-stretch the following find a local open sans font or import it, and allo...
font-style - CSS: Cascading Style Sheets
the font-style css descriptor allows authors to specify font styles for the fonts specified in the @font-face rule.
... formal definition related at-rule@font-faceinitial valuenormalcomputed valueas specified formal syntax normal | italic | oblique <angle>{0,2} examples specifying an italic font style as an example, consider the garamond font family, in its normal form, we get the following result: @font-face { font-family: garamond; src: url('garamond.ttf'); } the italicized version of this text uses the same glyphs present in the un...
font-variation-settings - CSS: Cascading Style Sheets
the font-variation-settings css descriptor allows authors to specify low-level opentype or truetype font variations in the @font-face rule.
... formal definition related at-rule@font-faceinitial valuenormalcomputed valueas specified formal syntax normal | [ <string> <number> ]# examples setting font weight and stretch in a @font-face rule @font-face { font-family: 'opentypefont'; src: url('open_type_font.woff2') format('woff2'); font-weight: normal; font-style: normal; font-variation-settings: 'wght' 400, 'wdth' 300; } specifications specificati...
font-weight - CSS: Cascading Style Sheets
the font-weight css descriptor allows authors to specify font weights for the fonts specified in the @font-face rule.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.8 | w3c understanding wcag 2.0 formal definition related at-rule@font-faceinitial valuenormalcomputed valueas specified formal syntax <font-weight-absolute>{1,2}where <font-weight-absolute> = normal | bold | <number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[1,1000]> examples setting normal font weight in a @font-face rule the follow...
unicode-range - CSS: Cascading Style Sheets
formal definition related at-rule@font-faceinitial valueu+0-10ffffcomputed valueas specified formal syntax <unicode-range># examples using a different font for a single character in this example we create a simple html containing a single <div> element, including an ampersand, that we want to style with a different font.
...we could also have done this by wrapping the ampersand in a <span> and applying a different font just to that, but that is an extra element and rule set.
@font-face - CSS: Cascading Style Sheets
the @font-face css at-rule specifies a custom font with which to display text; the font can be loaded from either a remote server or a locally-installed font on the user's own computer.
... the @font-face at-rule may be used not only at the top level of a css, but also inside any css conditional-group at-rule.
update - CSS: Cascading Style Sheets
slow the layout may change dynamically according to the usual rules of css, but the output device is not able to render or display changes quickly enough for them to be perceived as a smooth animation.
... fast the layout may change dynamically according to the usual rules of css, and the output device is not unusually constrained in speed, so regularly-updating things like css animations can be used.
bleed - CSS: Cascading Style Sheets
WebCSS@pagebleed
the bleed css at-rule descriptor, used with the @page at-rule, specifies the extent of the page bleed area outside the page box.
... formal definition related at-rule@pageinitial valueautocomputed valueas specified formal syntax auto | <length> examples setting a page bleed of 1cm @page { bleed: 1cm; } specifications specification status comment css paged media module level 3the definition of 'bleed' in that specification.
marks - CSS: Cascading Style Sheets
WebCSS@pagemarks
the marks css at-rule descriptor, used with the @page at-rule, adds crop and/or cross marks to the presentation of the document.
... formal definition related at-rule@pageinitial valuenonecomputed valueas specified formal syntax none | [ crop | cross ] examples adding crop and cross marks @page { marks: crop cross; } specifications specification status comment css paged media module level 3the definition of 'marks' in that specification.
size - CSS: Cascading Style Sheets
WebCSS@pagesize
the size css at-rule descriptor, used with the @page at-rule, defines the size and orientation of the box which is used to represent a page.
... formal definition related at-rule@pageinitial valueautocomputed valueas specified, but with relative lengths converted into absolute lengths formal syntax <length>{1,2} | auto | [ <page-size> | [ portrait | landscape ] ] examples specifying size and orientation @page { size: 4in 6in landscape; } nesting inside a @media rule @media print { @page { size: 50mm 150mm; } } specifications specification ...
max-height - CSS: Cascading Style Sheets
the max-height css descriptor specifies the maximum height of the viewport of a document defined via the @viewport at-rule.
... formal definition related at-rule@viewportinitial valueautopercentagesrefer to the height of the initial viewportcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto formal syntax <viewport-length>where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting viewport max height in...
max-width - CSS: Cascading Style Sheets
the max-width css descriptor specifies the maximum width of the viewport of a document defined via the @viewport at-rule.
... formal definition related at-rule@viewportinitial valueautopercentagesrefer to the width of the initial viewportcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto formal syntax <viewport-length>where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting viewport max width in ...
max-zoom - CSS: Cascading Style Sheets
the max-zoom css descriptor sets the maximum zoom factor of a document defined by the @viewport at-rule.
... formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative number or percentage as specified formal syntax auto | <number> | <percentage> examples setting max-zoom @viewport { max-zoom: 1.5; } specifications specification status comment css device adaptationthe definition of '"max-zoom" descriptor' in that specification.
min-height - CSS: Cascading Style Sheets
the min-height css descriptor specifies the minimum height of the viewport of a document defined via the @viewport at-rule.
... formal definition related at-rule@viewportinitial valueautopercentagesrefer to the height of the initial viewportcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto formal syntax <viewport-length>where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting viewport min height in...
min-zoom - CSS: Cascading Style Sheets
the min-zoom css descriptor sets the minimum zoom factor of a document defined by the @viewport at-rule.
... formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative number or percentage as specified formal syntax auto | <number> | <percentage> examples setting min zoom factor @viewport { min-zoom: 2.0; } specifications specification status comment css device adaptationthe definition of '"min-zoom" descriptor' in that specificat...
viewport-fit - CSS: Cascading Style Sheets
this descriptor hasn't been added to https://github.com/mdn/data/blob/master/css/at-rules.json yet.
... formal definition related at-rule@viewportinitial valueautocomputed valueas specified formal syntax auto | contain | cover examples scaling viewport to fit device display @viewport { viewport-fit: cover; } specifications specification status comment css round display level 1the definition of '"viewport-fit" descriptor' in that specification.
zoom - CSS: Cascading Style Sheets
WebCSS@viewportzoom
the zoom css descriptor sets the initial zoom factor of a document defined by the @viewport at-rule.
... formal definition related at-rule@viewportinitial valueautopercentagesthe zoom factor itselfcomputed valueauto, or a non-negative number or percentage as specified formal syntax auto | <number> | <percentage> examples setting viewport zoom factor @viewport { zoom: 2.0; } specifications specification status comment css device adaptationthe definition of '"zoom" descriptor' in that specificatio...
CSS Animations - CSS: Cascading Style Sheets
reference css properties animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function css at-rules @keyframes guides detecting css animation support describes a technique for detecting if a browser supports css animations.
...this article describes each relevant css property and at-rule and explains how they interact with each other.
Box alignment in grid layout - CSS: Cascading Style Sheets
this means that you can set alignment for all of your grid items at once, then override any items that need a different alignment by applying the align-self or justify-self property to the rules for the individual grid items.
...the exception to this rule is where the item has an intrinsic aspect ratio, for example an image.
CSS Multi-column Layout - CSS: Cascading Style Sheets
support is included for establishing the number of columns in a layout, as well as how content should flow from column to column, gap sizes between columns, and column dividing lines (known as column rules) along with their appearance.
... reference multiple-column layout properties column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns related css fragmentation properties break-after break-before break-inside orphans widows guides basic concepts of multicol an overview of the multiple-column layout specification styling columns how to use column rules and manage the spacing between columns.
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
let's consider the case of three flex items of differing content lengths and the following flex rules applied to them: flex: 1 1 auto; in this case the flex-basis value is auto and the items don’t have a width set, and so are auto-sized.
...you don’t usually want your content to disappear completely or for boxes to get smaller than their minimum content, so the above rules make sense in terms of sensible behaviour for content that needs to be shrunk in order to fit into a container.
CSS Grid Layout and Progressive Enhancement - CSS: Cascading Style Sheets
rather than checking a viewport width, or some feature of the browser or device, we check for support of a css property and value pair using an @supports rule.
... i use an @supports rule to check for support of display: grid.
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
i have a class of wide on my larger item, and i add a rule grid-column-end with a value of span 2.
...argin-top: auto; border-top: 1px solid #ffe066; padding: 10px; text-align: center; } .listing .body { padding: 10px; } .listing { list-style: none; margin: 2em; display: grid; grid-gap: 20px; grid-auto-flow: dense; grid-template-columns: repeat(auto-fill,minmax(200px, 1fr)); } .listing .wide { grid-column-end: span 2; } this technique of using auto-placement with some rules applied to certain items is very useful, and can help you to deal with content that is being output by a cms for example, where you have repeated items and can perhaps add a class to certain ones as they are rendered into the html.
Stacking context example 3 - CSS: Cascading Style Sheets
usually this kind of menu is script-generated either client-side or server-side, so style rules are assigned with a class selector instead of the id selector.
... so a third-level menu will be stacked under the following second-level menus, because all second-level menus share the same z-index value and the default stacking rules apply.
Basic Shapes - CSS: Cascading Style Sheets
.shape { float: left; shape-outside: inset(20px 10px 20px 10px round 10px); } using the same rules as we use for the margin shorthand, you can set more than one offset at once.
...so, the above rules could also be described as: .shape { float: left; shape-outside: inset(20px 10px round 10px); } in the example below we have an inset() shape used to pull content over the floated element.
Shapes from box values - CSS: Cascading Style Sheets
this shape follows all of the normal border radius shaping rules for the outside of the border.
...this shape follows all of the normal border radius shaping rules for the inside of the border.
Column layouts - CSS: Cascading Style Sheets
you can control the gaps between columns with the column-gap property, and add a rule between columns using column-rule.
... there is currently no way to add a rule between flex items, and browser support for the column-gap and row-gap properties is limited.
Value definition syntax - CSS: Cascading Style Sheets
they are used to group components to bypass the precedence rules.
... <'border-image-outset'> || <'border-image-slice'> | single bar exactly one of the components must be present smaller | small | normal | big | bigger [ ] brackets group components to bypass precedence rules bold [ thin && <length> ] multipliers no multiplier exactly 1 times solid * asterisk 0 or more times bold smaller* + plus sign 1 or more times bold smaller+ ?
all - CSS: Cascading Style Sheets
WebCSSall
user origin rolls back the cascade to the user-agent level, so that the specified values are calculated as if no author-level or user-level rules were specified for the element.
... author origin rolls back the cascade to the user level, so that the specified values are calculated as if no author-level rules were specified for the element.
animation-fill-mode - CSS: Cascading Style Sheets
the element will instead be displayed using any other css rules applied to it.
...the first relevant keyframe depends on the value of animation-direction: animation-direction first relevant keyframe normal or alternate 0% or from reverse or alternate-reverse 100% or to both the animation will follow the rules for both forwards and backwards, thus extending the animation properties in both directions.
contain - CSS: Cascading Style Sheets
WebCSScontain
strict indicates that all containment rules except style are applied to the element.
... content indicates that all containment rules except size and style are applied to the element.
counter-increment - CSS: Cascading Style Sheets
syntax /* increment "my-counter" by 1 */ counter-increment: my-counter; /* decrement "my-counter" by 1 */ counter-increment: my-counter -1; /* increment "counter1" by 1, and decrement "counter2" by 4 */ counter-increment: counter1 counter2 -4; /* do not increment/decrement anything: used to override less specific rules */ counter-increment: none; /* global values */ counter-increment: inherit; counter-increment: initial; counter-increment: unset; the counter-increment property is specified as either one of the following: a <custom-ident> naming the counter, followed optionally by an <integer>.
...this is used as the default value, or to cancel an increment in more specific rules.
counter-reset - CSS: Cascading Style Sheets
syntax /* set "my-counter" to 0 */ counter-reset: my-counter; /* set "my-counter" to -1 */ counter-reset: my-counter -1; /* set "counter1" to 1, and "counter2" to 4 */ counter-reset: counter1 1 counter2 4; /* cancel any reset that could have been set in less specific rules */ counter-reset: none; /* global values */ counter-reset: inherit; counter-reset: initial; counter-reset: unset; the counter-reset property is specified as either one of the following: a <custom-ident> naming the counter, followed optionally by an <integer>.
...this can be used to override a counter-reset defined in a less specific rule.
counter-set - CSS: Cascading Style Sheets
syntax /* set "my-counter" to 0 */ counter-set: my-counter; /* set "my-counter" to -1 */ counter-set: my-counter -1; /* set "counter1" to 1, and "counter2" to 4 */ counter-set: counter1 1 counter2 4; /* cancel any counter that could have been set in less specific rules */ counter-set: none; /* global values */ counter-set: inherit; counter-set: initial; counter-set: unset; the counter-set property is specified as either one of the following: a <custom-ident> naming the counter, followed optionally by an <integer>.
...this can be used to override a counter-set defined in a less specific rule.
image-rendering - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax auto | crisp-edges | pixelated examples setting image scaling algorithms in practical use, the pixelated and crisp-edges rules can be combined to provide some fallback for each other.
... (just prepend the actual rules with the fallback.) the canvas api can provide a fallback solution for pixelated through manual image data manipulation or with imagesmoothingenabled.
overflow-wrap - CSS: Cascading Style Sheets
(<code>hyphens</code>, english rules)</p> <p class="hyphens" lang="de">they say the fishing is excellent at lake <em class="hyphens">chargoggagoggmanchauggagoggchaubunagungamaugg</em>, though i've never been there myself.
... (<code>hyphens</code>, german rules)</p> css p { width: 13em; margin: 2px; background: gold; } .ow-anywhere { overflow-wrap: anywhere; } .ow-break-word { overflow-wrap: break-word; } .word-break { word-break: break-all; } .hyphens { hyphens: auto; } result specifications specification status comment css text module level 3the definition of 'overflow-wrap' in that specification.
Introduction to HTML5 - Developer guides
using the new html5 parser the parsing rules of html5, which analyze the meaning of mark-up, have been more precisely defined in html5.
...while it is true that all modern browsers now use these html5 parsing rules, non-html5-compliant browsers are still used by some.
XHTML - Developer guides
WebGuideHTMLXHTML
xhtml is a term that was historically used to describe html documents written to conform with xml syntax rules.
...instead, even though the documents are written to conform to xml syntax rules, they are served with a content-type: text/html header — so browsers parse those documents using html parsers rather than xml parsers, which can cause a variety of sometimes-very-surprising problems.
Mobile Web Development - Developer guides
WebGuideMobile
it includes techniques such as: fluid css layouts, to make the page adapt smoothly as the browser window size changes the use of media queries to conditionally include css rules appropriate for the device screen width and height the viewport meta tag instructs the browser to display your site at the appropriate scale for the user's device.
...if you don't do that, at least make sure that the default background contrasts with the text: that way, the page will at least be usable in a browser which is not targeted by your linear-gradient rule.
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
column-rule-color the color to use when drawing the line separating columns of text.
... the most important rule: never use color as the only way to know something.
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
as a general rule, you should avoid using them unless it can't be helped.
... ::placeholder { color: blue; } only the subset of css properties that apply to the ::first-line pseudo-element can be used in a rule using ::placeholder in its selector.
<table>: The Table element - HTML: Hypertext Markup Language
WebHTMLElementtable
rules this enumerated attribute defines where rules, i.e.
...it can have the following values: none, which indicates that no rules will be displayed; it is the default value; groups, which will cause the rules to be displayed between row groups (defined by the <thead>, <tbody> and <tfoot> elements) and between column groups (defined by the <col> and <colgroup> elements) only; rows, which will cause the rules to be displayed between rows; columns, which will cause the rules to be displayed between columns; all, which will cause the rules to be displayed between rows and columns.
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
111 <hr>: the thematic break (horizontal rule) element element, html, html grouping content, reference the html <hr> element represents a thematic break between paragraph-level elements: for example, a change of scene in a story, or a shift of topic within a section.
... 219 <wbr> element, html, html text-level semantics, reference, web the html <wbr> element represents a word break opportunity—a position within text where the browser may optionally break a line, though its line-breaking rules would not otherwise create a break at that location.
Using the application cache - HTML: Hypertext Markup Language
in addition, the browser also sends a checking event to the window.applicationcache object, and fetches the manifest file, following the appropriate http caching rules.
... if the manifest file has changed, all the files listed in the manifest—as well as those added to the cache by calling applicationcache.add()—are fetched into a temporary cache, following the appropriate http caching rules.
Reason: CORS request not HTTP - HTTP
resources in the same directory and its subdirectories were treated as having the same origin for purposes of the cors same-origin rule.
...therefore, other resources in the same directory or its subdirectories no longer satisfy the cors same-origin rule.
SameSite cookies - HTTP
set-cookie: flavor=choco; samesite=lax example: rewriteengine on rewritebase "/" rewritecond "%{http_host}" "^example\.org$" [nc] rewriterule "^(.*)" "https://www.example.org/index.html" [r=301,l,qsa] rewriterule "^(.*)\.ht$" "index.php?nav=$1 [nc,l,qsa,co=rewriterule;01;https://www.example.org;30/;samesite=none;secure] rewriterule "^(.*)\.htm$" "index.php?nav=$1 [nc,l,qsa,co=rewriterule;02;https://www.example.org;30/;samesite=none;secure] rewriterule "^(.*)\.html$" "index.php?nav=$1 [nc,l,qsa,co=rewri...
...terule;03;https://www.example.org;30/;samesite=none;secure] [...] rewriterule "^admin/(.*)\.html$" "admin/index.php?nav=$1 [nc,l,qsa,co=rewriterule;09;https://www.example.org:30/;samesite=strict;secure] specifications specification title rfc 6265, section 4.1: set-cookie http state management mechanism draft-ietf-httpbis-rfc6265bis-05 cookie prefixes, same-site cookies, and strict secure cookies ...
Proxy Auto-Configuration (PAC) file - HTTP
ronment where the internal dns server is set up so that it can only resolve internal host names, and the goal is to use a proxy only for hosts that aren't resolvable: function findproxyforurl(url, host) { if (isresolvable(host)) return "direct"; else return "proxy proxy.mydomain.com:8080"; } the above requires consulting the dns every time; it can be grouped intelligently with other rules so that dns is consulted only if other rules do not yield a result: function findproxyforurl(url, host) { if ( isplainhostname(host) || dnsdomainis(host, ".mydomain.com") || isresolvable(host) ) { return "direct"; } else { return "proxy proxy.mydomain.com:8080"; } } example 4 subnet based decisions in this example all of the hosts in a given subnet are connected-t...
...o directly, others are connected through the proxy: function findproxyforurl(url, host) { if (isinnet(host, "198.95.0.0", "255.255.0.0")) return "direct"; else return "proxy proxy.mydomain.com:8080"; } again, use of the dns server in the above can be minimized by adding redundant rules in the beginning: function findproxyforurl(url, host) { if ( isplainhostname(host) || dnsdomainis(host, ".mydomain.com") || isinnet(host, "198.95.0.0", "255.255.0.0") ) { return "direct"; } else { return "proxy proxy.mydomain.com:8080"; } } example 5 load balancing/routing based on url patterns this example is more sophisticated.
Expressions and operators - JavaScript
var n1 = !true; // !t returns false var n2 = !false; // !f returns true var n3 = !'cat'; // !t returns false short-circuit evaluation as logical expressions are evaluated left to right, they are tested for possible "short-circuit" evaluation using the following rules: false && anything is short-circuit evaluated to false.
... the rules of logic guarantee that these evaluations are always correct.
Working with objects - JavaScript
the exception to this rule is array-like object reflected from html, such as the forms array-like object.
...you could define a function that would format and display the properties of the previously-defined car objects; for example, function displaycar() { var result = `a beautiful ${this.year} ${this.make} ${this.model}`; pretty_print(result); } where pretty_print is a function to display a horizontal rule and a string.
JavaScript technologies overview - JavaScript
among other things, ecmascript defines: language syntax (parsing rules, keywords, control flow, object literal initialization, ...) error handling mechanisms (throw, try...catch, ability to create user-defined error types) types (boolean, number, string, function, object, ...) the global object.
... the css object model abstract css rules as objects.
Intl.Locale.prototype.collation - JavaScript
the intl.locale.prototype.collation property is an accessor property that returns the collation type for the locale, which is used to order strings according to the locale's rules.
... direct binary code point order (used in hindi) ducet the default unicode collation element table order emoji recommended ordering for emoji characters eor european ordering rules gb2312 pinyin ordering for latin, gb2312han charset ordering for cjk characters (used in chinese) phonebk phonebook style ordering (such as in german) phonetic phonetic ordering (sorting based on pronunciation) pinyin pinyin ordering for latin and for cjk characters (used in chinese) reformed reformed ordering (such as in swedish) ...
Intl.Locale - JavaScript
intl.locale.prototype.casefirst returns whether case is taken into account for the locale's collation rules.
... intl.locale.prototype.collation returns the collation type for the locale, which is used to order strings according to the locale's rules.
block - JavaScript
examples block scoping rules with var or function declaration in non-strict mode variables declared with var or created by function declarations in non-strict mode do not have block scope.
... block scoping rules with let, const or function declaration in strict mode by contrast, identifiers declared with let and const do have block scope: let x = 1; { let x = 2; } console.log(x); // logs 1 the x = 2 is limited in scope to the block in which it was defined.
Transitioning to strict mode - JavaScript
also, of course, in strict mode, the string is evaluated with strict mode rules.
...here are the rules to make your code strictness-neutral: write your code as strict and make sure no strict-only errors (from the above "new runtime errors" section) are thrown.
Authoring MathML - MathML
for example, here is a minimal stylesheet to use latin modern for the text and latin modern math for the mathematics: @namespace url('http://www.w3.org/1999/xhtml'); @namespace m url('http://www.w3.org/1998/math/mathml'); body, m|mtext { font-family: latin modern; } m|math { font-family: latin modern math; } you can then use the @font-face rule as usual to provide woff fallback for latin modern and latin modern math.
...one of the advantage of jqmath over the previous scripts is that it will automatically add some simple css rules to do the mathematical layout and make the formulas readable on browsers with limited mathml support.
Autoplay guide for media and Web Audio APIs - Web media technologies
autoplay availability as a general rule, you can assume that media will be allowed to autoplay only if at least one of the following is true: the audio is muted or its volume is set to 0 the user has interacted with the site (by clicking, tapping, pressing keys, etc.) if the site has been whitelisted; this may happen either automatically if the browser determines that the user engages with media frequently, or manually through pre...
...doing so outside the context of handling a user input event is subject to autoplay rules.
Image file type and format guide - Web media technologies
w3c liability, trademark, document use and software licensing rules apply.
...w3c liability, trademark, document use and software licensing rules apply.
Recommended Web Performance Timings: How long is too long? - Web Performance
there are no clear set rules as to what constitutes a slow pace when loading pages, but there are specific guidelines for indicating content will load (1 second), idling (50ms), animating (16.7s) and responding to user input (50 to 200ms).
...a second should be considered a rule in the maximum amount of time to indicate to a user that the request for new content was made and will load, such as the browser displaying the page title and the background color of the page displaying.
requiredFeatures - SVG: Scalable Vector Graphics
http://www.w3.org/tr/svg11/feature#basictext the browser supports the <text> element http://www.w3.org/tr/svg11/feature#paintattribute the browser supports the color, fill, fill-rule, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-width, color-interpolation and color-rendering attributes http://www.w3.org/tr/svg11/feature#basicpaintattribute the browser supports the color, fill, fill-rule, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-width and color-render...
...olorprofile the browser supports the <color-profile> element http://www.w3.org/tr/svg11/feature#gradient the browser supports the <lineargradient>, <radialgradient> and <stop> elements http://www.w3.org/tr/svg11/feature#pattern the browser supports the <pattern> element http://www.w3.org/tr/svg11/feature#clip the browser supports the <clippath> element and the clip-path, clip-rule attributes http://www.w3.org/tr/svg11/feature#basicclip the browser supports the <clippath> element and the clip-path attribute http://www.w3.org/tr/svg11/feature#mask the browser supports the <mask> element http://www.w3.org/tr/svg11/feature#filter the browser supports the <filter>, <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuse...
systemLanguage - SVG: Scalable Vector Graphics
note: the prefix matching rule does not imply that if a user understands a language with a certain tag, that the user will also understand all languages with the tag as prefix.
... the prefix rule simply allows the use of prefix tags if this is the case.
SVG Attribute reference - SVG: Scalable Vector Graphics
WebSVGAttribute
svg attributes a to z a accent-height accumulate additive alignment-baseline allowreorder alphabetic amplitude arabic-form ascent attributename attributetype autoreverse azimuth b basefrequency baseline-shift baseprofile bbox begin bias by c calcmode cap-height class clip clippathunits clip-path clip-rule color color-interpolation color-interpolation-filters color-profile color-rendering contentscripttype contentstyletype cursor cx cy d d decelerate descent diffuseconstant direction display divisor dominant-baseline dur dx dy e edgemode elevation enable-background end exponent externalresourcesrequired f fill fill-opacity fill-rule filter filterres filt...
... alignment-baseline, baseline-shift, clip, clip-path, clip-rule, color, color-interpolation, color-interpolation-filters, color-profile, color-rendering, cursor, direction, display, dominant-baseline, enable-background, fill, fill-opacity, fill-rule, filter, flood-color, flood-opacity, font-family, font-size, font-size-adjust, font-stretch, font-style, font-variant, font-weight, glyph-orientation-horizontal, glyph-orientation-vertical, image-rendering, kernin...
<a> - SVG: Scalable Vector Graphics
WebSVGElementa
try the @namespace rule to distinguish the two.
... <url> ; default value: none; animatable: yes global attributes core attributes most notably: id, lang, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, document element event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes most notably: xlink:title aria attributes aria-activedescendant,...
Fills and Strokes - SVG: Scalable Vector Graphics
there are additional stroke and fill properties available, including fill-rule, which specifies how to color in shapes that overlap themselves; stroke-miterlimit, which determines if a stroke should draw miters; and stroke-dashoffset, which specifies where to start a dasharray on a line.
...you can also use things like the :hover pseudo class to create rollover effects: #myrect:hover { stroke: black; fill: blue; } you can also specify an external stylesheet for your css rules through normal xml-stylesheet syntax: <?xml version="1.0" standalone="no"?> <?xml-stylesheet type="text/css" href="style.css"?> <svg width="200" height="150" xmlns="http://www.w3.org/2000/svg" version="1.1"> <rect height="10" width="10" id="myrect"/> </svg> where style.css looks something like: #myrect { fill: red; stroke: black; } « previousnext » ...
SVG In HTML Introduction - SVG: Scalable Vector Graphics
when the user enters something incorrect into the form, the script sets the invalid attribute on the <body>, and a style rule changes the gradient end-stop color to red.
... (another style rule makes an error message appear.) this approach has the following points in its favor: we have taken a regular html form that could have been part of an existing web site, and added an attractive, interactive background the approach is backwards compatible to browsers that do not support svg; simply, no background appears in them it's very simple and performs very well the picture dynamically sizes itself to the required size in an intelligent way we can have declarative style rules applying to both html and svg the same script manipulates both html and svg the document is entirely standards-based to add a linked image with dom methods to an embedded svg element, one has to use setattributens to set href.
<xsl:apply-imports> - XSLT: Extensible Stylesheet Language Transformations
import precedence requires that template rules in main stylesheets have higher precedence than template rules in imported stylesheets.
... sometimes, however, it is useful to be able to force the processor to use a template rule from the (lower precedence) imported stylesheet rather than an equivalent rule in the main stylesheet.
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
import precedence requires that template rules in main stylesheets have higher precedence than template rules in imported stylesheets.
... sometimes, however, it is useful to be able to force the processor to use a template rule from the (lower precedence) imported stylesheet rather than an equivalent rule in the main stylesheet.
request - Archive of obsolete content
however, keep in mind that the same validation rules that apply to options in the constructor will apply during assignment.
core/promise - Archive of obsolete content
in general good rule of thumb is to prefer then based flat chaining.
Low-Level APIs - Archive of obsolete content
stylesheet/style modify styles using stylesheet files or css rules.
Add-on SDK - Archive of obsolete content
sdk infrastructure aspects of the sdk's underlying technology: modules, the program id and the rules defining firefox compatibility.
Forms related code snippets - Archive of obsolete content
filter the digitation into a form field this example shows the use of the onkeypress event during a digitation into a form field in order to match some rules.
Examples and demos from articles - Archive of obsolete content
dropdown menus rules how to create pure-css dropdown menus.
Windows - Archive of obsolete content
for example, the following code will add a horizontal rule.
Displaying web content in an extension without security issues - Archive of obsolete content
so the usual rule is: don’t change the value of the "type" attribute.
Enhanced Extension Installation - Archive of obsolete content
messages that appear in the extensions ui in response to user-actions such as install, uninstall, enable and disable are now driven by the extensions datasource itself and are supplied by the em:displaydescription property, rather than being supplied by the front end and several different redundant xbl bindings/style rules.
Install Manifests - Archive of obsolete content
for firefox/thunderbird 1.0, the format must conform to the rules specified in extension versioning, update and compatibility.
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
this is because there may be cases where a script or css rule will be written in such a way that they treat the value as true unconditionally if any value has been set.
Adding windows and dialogs - Archive of obsolete content
the only constant rule is that clicking on ok and cancel will close the dialog unless your associated function returns false.
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
settimeout("alert('" + xhr.responsetext + "');", 100); // attacker manipulated responsetext to contain "attack!'); format_computer(); alert('done" settimeout("alert('attack!'); format_computer(); alert('done');", 100); as a general rule of thumb, just don't pass code around as strings and execute it by calling eval, settimeout and friends.
XPCOM Objects - Archive of obsolete content
childarray = childarrayobj.value; the general rule for out parameters is that you can pass an empty object, and then you can get the result by accessing the value attribute in this object after the method call.
Performance best practices in extensions - Archive of obsolete content
remember that any selector in your rule which might match many different nodes is a source of inefficiency during either selector matching or dynamic update processing.
Firefox addons developer guide - Archive of obsolete content
rules: file and directory names: italic method and variable names: class name if you want to add a fixme, add: fixme: a message notes: the original document is in japanese and distributed via the xuldev.org website.
Using Dependent Libraries In Extension Components - Archive of obsolete content
psrcdir = @top_srcdir@ vpath = @srcdir@ include $(depth)/config/autoconf.mk module = bsmedberg library_name = bsmedberg_stub is_component = 1 force_shared_lib = 1 requires = \ xpcom \ string \ $(null) cppsrcs = bdsstubloader.cpp extra_dso_ldopts += \ $(dist)/lib/$(lib_prefix)xpcomglue_s.$(lib_suffix) \ $(xpcom_frozen_ldopts) \ $(nspr_libs) \ $(null) include $(topsrcdir)/config/rules.mk defines += -dmoz_dll_prefix=\"$(dll_prefix)\" extensions/stub/bdsstubloader.cpp // copyright (c) 2005 benjamin smedberg <benjamin@smedbergs.us> #include "nscore.h" #include "nsmodule.h" #include "prlink.h" #include "nsilocalfile.h" #include "nsstringapi.h" #include "nscomptr.h" static char const *const kdependentlibraries[] = { // dependent1.dll on windows, libdependent1.so on linux m...
JXON - Archive of obsolete content
the following is a transcription of the parker convention paper (version 0.4), from the page “transformingrules” of the xml2json-xslt project site.
Makefile - .mk files - Archive of obsolete content
makefile description client.mk top level makefile which controls the overall build config/android-common.m config/autoconf.mk config/rules.mk targets (export, deps, libs, tools) and generic build rules config/static-checking-config.mk config/version.mk makefile description config/myconfig.mk user defined build configuration values config/myrules.mk user defined makefile rules for building $(topsrcdir)/$(moz_build_app)/app-config.mk application specific build configuration ...
Notes on HTML Reflow - Archive of obsolete content
there are exceptions to this rule: most notably, html tables may require more than one pass.
Adding the structure - Archive of obsolete content
we'll update the value of that attribute each time we retrieve tinderbox's status from the server, and we'll define css rules that change the appearance of the icon depending on the value of that attribute.
Enabling the behavior - updating the status bar panel - Archive of obsolete content
when it finds a color, it sets the panel's status attribute to the corresponding status, which causes the previously defined css rules to switch to the icon appropriate for that status.
Editor Embedding Guide - Archive of obsolete content
pr_true); the valid editor types are: "text" (similar to notepad or a textarea; does not allow for html) "textmail" (similar to "text" but html can be inserted; intended for plaintext mail usage and handling of citations) "html" (this is the default type if no type is specified; it allows for all html tags to be inserted) "htmlmail" (this is much like "html" except there are a few editing rules/behaviors that differ such as splitting of mail quotes) editor commands you need to call commands and receive updates in order to make any changes to the content on the browser.
Documentation for BiDi Mozilla - Archive of obsolete content
this is determined in nstextfragment::setto the page includes a element with the attribute dir=rtl, either explicitly (nsgenerichtmlelement::mapcommonattributesinto), or as a consequence of a style rule (mapdeclarationtextinto in nscssstylerule.cpp) all these cases use nsdocument::enablebidi to set the flag mbidienabled.
Layout FAQ - Archive of obsolete content
you can work around it by removing display:table in the style rule with the "#main" selector or adding clear:both to it.
Java in Firefox Extensions - Archive of obsolete content
greeting = astaticmethod.invoke(null, []); alert(greeting); another, perhaps simpler approach is as follows: var myclass = loader.loadclass('com.example.myclass'); // use the same loader from above var myobj = myclass.newinstance(); var binval = myobj.mymethod(arg1, arg2); // pass whatever arguments you need (they'll be auto-converted to java form, taking into account the liveconnect conversion rules) for more complex cases, in which you need to call a specific constructor with arguments, you will need reflection.
jspage - Archive of obsolete content
unction(c,b){if($type(c)!="fx:css:value"){c=this.parse(c);}var a=[];c.each(function(d){a=a.concat(d.parser.serve(d.value,b)); });return a;},render:function(a,d,c,b){a.setstyle(d,this.serve(c,b));},search:function(a){if(fx.css.cache[a]){return fx.css.cache[a];}var b={};array.each(document.stylesheets,function(e,d){var c=e.href; if(c&&c.contains("://")&&!c.contains(document.domain)){return;}var f=e.rules||e.cssrules;array.each(f,function(j,g){if(!j.style){return;}var h=(j.selectortext)?j.selectortext.replace(/^\w+/,function(i){return i.tolowercase(); }):null;if(!h||!h.test("^"+a+"$")){return;}element.styles.each(function(k,i){if(!j.style[i]||element.shortstyles[i]){return;}k=string(j.style[i]);b[i]=(k.test(/^rgb/))?k.rgbtohex():k; });});});return fx.css.cache[a]=b;}});fx.css.cache={};fx.css.pars...
Microsummary XML grammar reference - Archive of obsolete content
firefox determines which interval to apply to a microsummary generated by a generator according to the following rules: firefox processes each <condition> child element in document order.
Modularization techniques - Archive of obsolete content
there are a number of basic reference counting rules to remember.
Space Manager High Level Design - Archive of obsolete content
d (with nsblockreflowstate::getavailablespace); the float frame that is get from the passed nsfloatcache argument is reflowed and its rect is retrieved with getrect; the floats margins are added; check if the float can be placed in the actual band: if not advance to the next band; check the float type and if it can be added to the space manager; align the float to its containing block top if rule css2/9.5.1/4 is not respected; add the float using nsspacemanager::addrectregion compare the area that the float used to occupy with the area that it now occupies: if different, record the vertically affected interval using nsspacemanager::includeindamage use case 3: space manager is used to find available space to reflow into the nsblockframe makes use of the space manager indirectly to get...
Merging TraceMonkey Repo - Archive of obsolete content
if the sheriff gives you permission to land, hg push -r default ssh://hg.mozilla.org/tracemonkey and hg push ssh://hg.mozilla.org/mozilla-central if you can't push to mozilla-central because somebody ignored the "ask the sheriff" rule and pushed there anyway, that's typical, and it just means you have to repeat the above process.
Table Cellmap - Border Collapse - Archive of obsolete content
roupowner = 1, eajacolgroupowner = 2, // col group to the left ecolowner = 3, eajacolowner = 4, // col to the left erowgroupowner = 5, eajarowgroupowner = 6, // row group above erowowner = 7, eajarowowner = 8, // row above ecellowner = 9, eajacellowner = 10 // cell to the top or to the left the ownership is determined by the rules for border conflict resolution as defined in css 2.1 corner for the corner we store the corner ownership, defined by the orientation of the major edge relative to the corner that goes into that corner.
Tamarin build documentation - Archive of obsolete content
to build tamarin: copy tamarin/platform/win32/armasm.rules to c:/program files/microsoft visual studio 9.0/vc/vcprojectdefaults build "builtin.h" following the instructions below in the section "compiling and running applications" do the same for shell_toplevel.h, starting in avmplus/shell, using the command "python shell_toplevel.py" open the tamarin project file "platform/win32/avmplus2008.sln".
Tamarin Build System Documentation - Archive of obsolete content
ests are located in the tamarin-repository, test/run-smokes.txt, assume the start directory is test format is cd testdir; command to run test above the test should be a # comment describing why the test in the smokes, when test failed, possibly a bugzilla bug the tests can be run by following the above instructions for running buildbot scripts locally and executing the all/run-smoke-tests.sh as a rule any test failure should be immediately added to the top of the smoke test list so the list is prioritized how to exclude tests from acceptance or mark them as known failures?
The life of an HTML HTTP request - Archive of obsolete content
this is done by the nscssframeconstructor, which creates frames for each content node according to the rules specified in the user agent stylesheet (ua.css) and the document specific style sheets.
Example Sticky Notes - Archive of obsolete content
you add a binding file using -moz-binding style rule and you address a particular binding by its id: -moz-binding: url(notes.xml#default) this id is local within the binding file (not visible in the target document dom tree).
XBL 1.0 Reference - Archive of obsolete content
ty getter setter method parameter body handlers handler resources stylesheet image binding attachment and detachment attachment using css attachment using element.style property <constructor> call <destructor> call binding documents dom interfaces the nsidomdocumentxbl interface anonymous content introduction scoping and access using the dom content generation rules for generation attribute forwarding insertion points <children> handling dom changes event flow and targeting flow and targeting across scopes focus and blur events mouseover and mouseout events anonymous content and css selectors and scopes binding stylesheets binding implementations introduction methods properties inheritance of imp...
crop - Archive of obsolete content
ArchiveMozillaXULAttributecrop
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } ...
member - Archive of obsolete content
if not specified, the variable specified in the uri attribute in the action body of the template's first rule is used.
parsetype - Archive of obsolete content
« xul reference home parsetype type: string if this attribute is set to integer, the rule will only match rdf nodes with a parse type of integer.
template.container - Archive of obsolete content
if not specified, the variable specified in the uri attribute of the content tag in the template's first rule is used.
International characters in XUL JavaScript - Archive of obsolete content
if the script file is loaded via http, the http header can contain a character encoding declaration as part of the content-type header, for example: content-type: application/javascript; charset=utf-8 if no charset parameter is specified, the same rules as above apply.
MenuItems - Archive of obsolete content
<menuitem id="bookmark" class="menu-iconic" label="bookmarks" image="bookmarks.png"/> menu icon animation in order to animate the menu item icon on hover a -moz-image-region rule can be applied.
builder - Archive of obsolete content
you may need to do this if you have adjusted the rules manually.
tag - Archive of obsolete content
ArchiveMozillaXULPropertytag
this attribute is useful to provide different rules for outer and inner elements.
Containment Properties - Archive of obsolete content
<vbox datasources="template-guide-ex1.rdf" ref="http://www.xulplanet.com/rdf/a" containment="http://www.xulplanet.com/rdf/relateditem"> <template> <rule> <label uri="rdf:*" value="rdf:*"/> </rule> </template> </vbox> instead of iterating over a container, this example iterates over a specific predicate.
Introduction - Archive of obsolete content
the template syntax allows for different rules to generate different content based on particular criteria as well as set attribute values from returned results.
XML Templates - Archive of obsolete content
this is useful when recursive generation or multiple rules are used, and we'll see examples of why this is useful later.
Template Guide - Archive of obsolete content
basics of xul templates introduction rule compilation rdf template syntax result generation rdf query syntax actions recursive generation simple example bindings additional navigation filtering static content simple query syntax containment properties xml template syntax xml templates xml assignments sql template syntax sqlite templates common template syntax attribute substitution multiple rules using recursive templates building menus with templates special condition tests multiple queries using multiple queries to generate more results building trees with templates building trees building hierarchical trees template modifications template builder interface template and tree listeners rdf modifications additional topics sorti...
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
icons in various applications for both modes are summarized in the following table (feel free to add information about other applications): application (theme name) big icon size small icon size firefox 1.0 (winstripe) 24x24 16x16 thunderbird 1.0 (qute) 24x24 16x16 the stylesheet to set the image for your toolbar button, use the following css rules: /* skin/toolbar-button.css */ #myextension-button { list-style-image: url("chrome://myextension/skin/btn_large.png"); } toolbar[iconsize="small"] #myextension-button { list-style-image: url("chrome://myextension/skin/btn_small.png"); } applying the stylesheet remember to attach the stylesheet you created to both the overlay file and the customize toolbar window.
Complete - Archive of obsolete content
in this extension, the only things that depend on the theme are the icon images on the buttons and the css style rules.
Anonymous Content - Archive of obsolete content
this also applies to css selector rules.
Groupboxes - Archive of obsolete content
the groupbox is a type of box, and the elements it contains are aligned according to the xul box rules.
Introduction to XBL - Archive of obsolete content
like xul, xbl is an xml language, so it has similar syntax rules.
Simple Menu Bars - Archive of obsolete content
although you can create custom menus, any special style rules or non-menu elements that you place on a menu may not be applied.
The Box Model - Archive of obsolete content
although a box is the fundamental part of xul element layout, it follows a few very simple rules.
XUL Tutorial - Archive of obsolete content
updating commands broadcasters and observers document object model document object model modifying a xul interface manipulating lists box objects xpcom interfaces xpcom examples trees trees more tree features tree selection custom tree views tree view details tree box objects rdf and templates introduction to rdf templates trees and templates rdf datasources advanced rules persistent data skins and locales adding style sheets styling a tree modifying the default skin creating a skin skinning xul files by hand localization property files bindings introduction to xbl anonymous content xbl attribute inheritance adding properties adding methods adding event handlers xbl inheritance creating reusable content using css and xbl xbl example spec...
Using the standard theme - Archive of obsolete content
ing instructions simply add one <tt>xml-stylesheet</tt> processing instruction for every style sheet you want to associate with your xul file: <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <?xml-stylesheet href="chrome://myextension/skin/custom.css" type="text/css"?> <tt>@import</tt> chains first, import the global skin in your custom style sheet using the css <tt>@import</tt> rule: @import url("chrome://global/skin/"); you then have to associate your xul file with your custom style sheet only: <?xml-stylesheet href="chrome://myextension/skin/custom.css" type="text/css"?> applying different custom style sheets depending on the selected theme mozilla is able to automatically pick your custom style sheet depending on the theme currently chosen by the user.
Accessibility/XUL Accessibility Reference - Archive of obsolete content
owscrollbox bbox box grippy hbox menuseparator overlay page script spacer splitter stringbundle stringbundleset vbox window elements not processed yet: action binding bindings broadcaster broadcasterset conditions content dialog dialogheader editor listcell member observes preference preferences prefpane prefwindow resizer richlistbox richlistitem resizer rule scrollbar scrollbox scrollcorner separator template textnode titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring toolbox tooltip treeseparator triple wizard wizardpage cases to revisit: ...
binding - Archive of obsolete content
that name can then be used within the action of a rule.
button - Archive of obsolete content
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } dir type: one of the values below the direction in which the child elements of the element are placed.
caption - Archive of obsolete content
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } image type: uri the uri of the image to appear on the element.
checkbox - Archive of obsolete content
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled type: boolean indicates whether the element is disabled or not.
description - Archive of obsolete content
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled type: boolean indicates whether the element is disabled or not.
dialogheader - Archive of obsolete content
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } description type: string descriptive text to appear in addition to the dialog title.
elements - Archive of obsolete content
k key keyset l label listbox listcell listcol listcols listhead listheader listitem m member menu menubar menuitem menulist menupopup menuseparator o observes overlay p page popup popupset preference preferences prefpane prefwindow progressmeter r radio radiogroup resizer richlistbox richlistitem resizer row rows rule s script scrollbar scrollbox scrollcorner separator spacer splitter stack statusbar statusbarpanel stringbundle stringbundleset t tab tabbrowser tabbox tabpanel tabpanels tabs template textnode textbox titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring t...
label - Archive of obsolete content
ArchiveMozillaXULlabel
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled type: boolean indicates whether the element is disabled or not.
listcell - Archive of obsolete content
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled type: boolean indicates whether the element is disabled or not.
listitem - Archive of obsolete content
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } current type: boolean this attribute will be set to true if the listitem is the current item.
member - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] used within a rule's conditions element to match elements that are containers or are contained within another element.
menu - Archive of obsolete content
ArchiveMozillaXULmenu
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled type: boolean indicates whether the element is disabled or not.
menuitem - Archive of obsolete content
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } description type: string descriptive text to appear in addition to the dialog title.
menulist - Archive of obsolete content
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disableautoselect type: boolean if this attribute is true or omitted, the selected item on the menu will update to match what the user entered in the textbox.
menuseparator - Archive of obsolete content
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled type: boolean indicates whether the element is disabled or not.
radio - Archive of obsolete content
ArchiveMozillaXULradio
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled type: boolean indicates whether the element is disabled or not.
<statusbarpanel> - Archive of obsolete content
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } image type: uri the uri of the image to appear on the element.
tab - Archive of obsolete content
ArchiveMozillaXULtab
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } disabled type: boolean indicates whether the element is disabled or not.
textnode - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] normally when substituting rdf resources in template rules, you place the rdf property name inside an attribute value preceded with rdf:.
toolbarbutton - Archive of obsolete content
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } dir type: one of the values below the direction in which the child elements of the element are placed.
tooltip - Archive of obsolete content
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } default type: boolean if true, the tooltip is used as the default popup for displaying tooltips in the window.
tree - Archive of obsolete content
ArchiveMozillaXULtree
interfaces nsiaccessibleprovider, nsidomxultreeelement, nsidomxulmultiselectcontrolelement script examples to have alternating colors for each row, use the style rules like the following: treechildren::-moz-tree-row(selected) { background-color: #ffffaa; } treechildren::-moz-tree-row(odd) { background-color: #eeeeee; } treechildren::-moz-tree-row(odd, selected) { background-color: #ffffaa; } treechildren::-moz-tree-cell-text(selected) { color: #000000; } treechildren::-moz-tree-cell-text(odd, selected) { color: #000000; } if using a content tree view, use t...
treecol - Archive of obsolete content
for example, for a menuitem in a menu you can add the following css rule when you want to use the value none: menupopup > menuitem, menupopup > menu { max-width: none; } cycler type: boolean if true, then the column is a cycler column.
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
you can make this jar.mn to rule them all just by concatenating the three files in the mccoy example and updating the path to each file (since you will need to point to the correct subdirectory): mccoy.jar: % content mccoy %content/ * content/mccoy.xul (content/mccoy.xul) content/mccoy.js (content/mccoy.js) * content/mccoy.xml (content/mccoy.xml) ...etc...
Custom app bundles for Mac OS X - Archive of obsolete content
defaults/ preferences/ app-prefs.js (this provides some default values for preferences) application bundle contents in addition to the standard directory hierarchy that's required of all mac os x applications, as shown above in application bundle layout, there are some specific rules for what content goes where: the top-level directory is given a name that ends with .app which designates the whole package as an application bundle.
Deploying XULRunner - Archive of obsolete content
xulrunner 39 and later due to mac os x code signing rules and how they interact with the design of xulrunner (see bug 1105044 for the inside scoop), starting with xulrunner 39 the xulrunner library files are no longer able to reside in a xulrunner framework directory.
Using LDAP XPCOM with XULRunner - Archive of obsolete content
srcdir = @top_srcdir@ vpath = @srcdir@ include $(depth)/config/autoconf.mk module = mozldapstub library_name = mozldap_stub is_component = 1 force_shared_lib = 1 requires = \ xpcom \ string \ $(null) cppsrcs = ldapstubloader.cpp extra_dso_ldopts += \ $(dist)/lib/$(lib_prefix)xpcomglue_s.$(lib_suffix) \ $(xpcom_frozen_ldopts) \ $(nspr_libs) \ $(null) include $(topsrcdir)/config/rules.mk defines += -dmoz_dll_prefix=\"$(dll_prefix)\" ldapstubloader.cpp: // copyright (c) 2005 benjamin smedberg <benjamin@smedbergs.us> #include "nscore.h" #include "nsmodule.h" #include "prlink.h" #include "nsilocalfile.h" #include "nsstringapi.h" #include "nscomptr.h" static char const *const kdependentlibraries[] = { #ifdef ns_win32 moz_dll_prefix "nsldap32v50" moz_dll_suffix, moz_dll_pr...
XULRunner tips - Archive of obsolete content
or.jar!/locale/inspector/ skin inspector modern/1.0 jar:inspector.jar!/skin/modern/inspector/ skin inspector classic/1.0 jar:inspector.jar!/skin/classic/inspector/ overlay chrome://inspector/content/popupoverlay.xul chrome://inspector/content/viewers/dom/popupoverlay.xul overlay chrome://inspector/content/commandoverlay.xul chrome://inspector/content/viewers/stylerules/commandoverlay.xul overlay chrome://inspector/content/keysetoverlay.xul chrome://inspector/content/viewers/dom/keysetoverlay.xul overlay chrome://inspector/content/popupoverlay.xul chrome://inspector/content/viewers/stylerules/popupoverlay.xul overlay chrome://inspector/content/commandoverlay.xul chrome://inspector/content/viewers/dom/commandoverlay.xul to launch dom inspector in your ap...
nsIContentPolicy - Archive of obsolete content
type_font 14 indicates a font loaded via @font-face rule.
Gecko Compatibility Handbook - Archive of obsolete content
<!---- this is an invalid html comment accepted in quirks comment parsing ----> <!-- this is a valid html comment accepted in stricts comment parsing --> for the exact rules on which doctypes invoke quirks vs.
Mozilla.dev.apps.firefox-2006-10-06 - Archive of obsolete content
title case capitalization rules in firefox discussion regarding rules for capitalizing the first letter of firefox menu items in the ff ui.
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.accessibility - oct 6, 2006 announcements legal precedent set for web accessibility us federal court rules that retailers may be sued if its website is inaccsessible.
2006-10-06 - Archive of obsolete content
title case capitalization rules in firefox discussion regarding rules for capitalizing the first letter of firefox menu items in the ff ui.
2006-11-03 - Archive of obsolete content
when he builds using the disable.crypto option he encounters the following problem: no rule to make target `../../dist/lib/components/libpipboot.a', needed by `minimo'.
2006-11-10 - Archive of obsolete content
announcments mike connor announced new 'driving' bugs "we have added a pair of drivers-only flags...o track bugs that are not strictly blockers, but are wanted as soon as possible" benjamin smedberg announced new rules for patches to toolkit from now on unit test must be provided with all patches.
2006-09-29 - Archive of obsolete content
css matching rules.
2006-09-06 - Archive of obsolete content
threading in xpcom rules on threading in xpcom or to firefox extensions.
NPAPI plugin developer guide - Archive of obsolete content
standing the runtime model plug-in detection how gecko finds plug-ins checking plug-ins by mime type overview of plug-in structure understanding the plug-in api plug-ins and platform independence windowed and windowless plug-ins the default plug-in using html to display plug-ins plug-in display modes using the object element for plug-in display nesting rules for html elements using the appropriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory sending and receiving streams working with urls getting version and ui infor...
Introduction to SSL - Archive of obsolete content
decisions about which cipher suites a particular organization decides to enable depend on trade-offs among the sensitivity of the data involved, the speed of the cipher, and the applicability of export rules.
-ms-scrollbar-3dlight-color - Archive of obsolete content
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples the following example shows how to create a style rule that sets the -ms-scrollbar-3dlight-color property for a <textarea> element.
-ms-scrollbar-darkshadow-color - Archive of obsolete content
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples the following example shows how to create a style rule that sets the -ms-scrollbar-darkshadow-color property for a <textarea> element.
-ms-scrollbar-shadow-color - Archive of obsolete content
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples the following example shows how to create a style rule that sets the -ms-scrollbar-shadow-color property for a <textarea> element.
::-ms-browse - Archive of obsolete content
permitted properties only the following css properties can be used in a rule with ::-ms-browse in its selector.
::-ms-check - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-check in its selector.
::-ms-clear - Archive of obsolete content
such inputs include: <input type="color"> <input type="date"> <input type="datetime"> <input type="datetime-local"> <input type="email"> <input type="month"> <input type="number"> <input type="search"> <input type="tel"> <input type="time"> <input type="url"> <input type="week"> allowable properties only the following css properties can be used in a rule with ::-ms-clear in its selector.
::-ms-expand - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-expand in its selector.
::-ms-fill-lower - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-fill-lower in its selector.
::-ms-fill-upper - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-fill-upper in its selector.
::-ms-fill - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-fill in its selector.
::-ms-reveal - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-reveal in its selector.
::-ms-thumb - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-thumb in its selector.
::-ms-ticks-after - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-ticks-after in its selector.
::-ms-ticks-before - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-ticks-before in its selector.
::-ms-tooltip - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-tooltip in its selector.
::-ms-track - Archive of obsolete content
allowable properties only the following css properties can be used in a rule with ::-ms-track in its selector.
CSS - Archive of obsolete content
ArchiveWebCSS
a slider control is one possible representation of <input type="range">.::-ms-valuethe ::-ms-value css pseudo-element is a microsoft extension that applies rules to the value of a text or password <input> control or the content of a <select> control.@mediaparent for archived media features.azimuthin combination with elevation, the azimuth css property enables different audio sources to be positioned spatially for aural presentation.
Descendants and Filters - Archive of obsolete content
the same rules that apply to the .
Writing JavaScript for XHTML - Archive of obsolete content
whilst authored to the stricter rules of xml, they are sent with the media type for html (text/html).
Implementation Status - Archive of obsolete content
partial 302497; 329143; 9.3 repeat module partial 264329; 273706; 9.3.1 repeat partial we do not support number attribute 302026; 9.3.2 nested repeats supported 9.3.3 repeat processing partial we currently obey the 1.0 rules for repeat 9.3.4 user interface interaction partial we currently obey the 1.0 rules for repeat, no support for @number 302026; 9.3.5 creating repeating structures via attributes partial does not work for html:tr, html:td, or xf:group elements 340515; 350617; 9.3.6 itemset supported...
Styling Abbreviations and Acronyms - Archive of obsolete content
ng to guideline 4 of the web content accessibility guidelines, both elements should be given a title attribute to improve "readability of the web for all people, including those with learning disabilities, cognitive disabilities, or people who are deaf." the problem authors have discovered that any abbr or acronym that has a title attribute is rendered with a dotted underline, per the following rule in resource://gre-resources/html.css abbr[title], acronym[title] { text-decoration: dotted underline; } the solution if authors wish to remove the underline from abbr and acronym elements, this can be done with the following rule: abbr[title], acronym[title] { text-decoration: none; } it may be better to lessen the visual weight of the border without actually removing it.
Using the Right Markup to Invoke Plugins - Archive of obsolete content
param name="movie" value="javascript_to_flash.swf" /> <param name="quality" value="high" /> <param name="swliveconnect" value="true" /> <embed src="javascript_to_flash.swf" quality="high" width="366" height="142" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/downloads/" name="myflash" swliveconnect="true"> </embed> </object> links to the rules governing the use of the embed element can be found in the references section.
Windows Media in Netscape - Archive of obsolete content
summary: cross browser use of windows media player in ie and netscape 7.1 don't use proprietary dom sniffs such as looking for document.all-- this will rule out netscape 7.1.
Visual-js game engine - Game development
new link is : https://github.com/zlatnaspirala/visual-ts-game-engine basic licence rules : 1) each file in this project has its own license , be careful , do not violate the basic rules.
API - MDN Web Docs Glossary: Definitions of Web-related terms
an api (application programming interface) is a set of features and rules that exist inside a software program (the application) enabling interaction with it through software - as opposed to a human user interface.
Conditional - MDN Web Docs Glossary: Definitions of Web-related terms
a condition is a set of rules that can interrupt normal code execution or change it, depending on whether the condition is completed or not.
Falsy - MDN Web Docs Glossary: Definitions of Web-related terms
there are 8 falsy values: false the keyword false 0 the number zero -0 the number negative zero 0n bigint, when used as a boolean, follows the same rule as a number.
IMAP - MDN Web Docs Glossary: Definitions of Web-related terms
more recent than pop3, imap allows folders and rules on the server.
Media (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
@media at-rule conditionally apply part of a stylesheet, based on the result of a media query.
Regular expression - MDN Web Docs Glossary: Definitions of Web-related terms
regular expressions (or regex) are rules that govern which sequences of characters come up in a search.
SGML - MDN Web Docs Glossary: Definitions of Web-related terms
it is worth noting that since its fifth edition, html is no longer sgml-based and has its own parsing rules.
Stylesheet - MDN Web Docs Glossary: Definitions of Web-related terms
a stylesheet is a set of css rules used to control the layout and design of a webpage or document.
TOFU - MDN Web Docs Glossary: Definitions of Web-related terms
tofu is used in the ssh protocol, in http public key pinning (hpkp) where the browsers will accept the first public key returned by the server, and in strict-transport-security (hsts) where a browser will obey the redirection rule.
W3C - MDN Web Docs Glossary: Definitions of Web-related terms
the world wide web consortium (w3c) is an international body that maintains web-related rules and frameworks.
Web standards - MDN Web Docs Glossary: Definitions of Web-related terms
web standards are rules established by international standards bodies and defining how how the web works (and sometimes controlling the internet as well).
XHTML - MDN Web Docs Glossary: Definitions of Web-related terms
xhtml is a term that was historically used to describe html documents written to conform with xml syntax rules.
firewall - MDN Web Docs Glossary: Definitions of Web-related terms
it can either let it pass or block it, according to some specified rules.
non-normative - MDN Web Docs Glossary: Definitions of Web-related terms
software specifications often contains information marked as non-normative or informative, which means that those are provided there for the purpose of helping the readers to understand the specification better or to show an example or a best practice, and not needed to be followed as a rule.
Property (CSS) - MDN Web Docs Glossary: Definitions of Web-related terms
here's an example of a css rule: /* "div" is a selector indicating that all the div elements */ /* in the document will be styled by that rule */ div { /* the property "color" with the value "black" indicates */ /* that the text will have the color black */ color: black; /* the property "background-color" with the value "white" indicates */ /* that the background color of the elements will be white */ background-color: white; } learn more general knowledge learn css technical reference the css reference on mdn the css working group current work ...
MDN Web Docs Glossary: Definitions of Web-related terms
webm webp webrtc websockets webvtt whatwg whitespace world wide web wrapper x xforms xhr (xmlhttprequest) xhtml xinclude xlink xml xpath xquery xslt other 404 502 alpn at-rule attack byte-order mark character set client cryptosystem debug digital signature execution flex-direction glsl interface library memory management routers self-executing anonymous function stylesheet vector image ...
Test your skills: CSS and JavaScript accessibility - Learn web development
we'd like you to assume that the existing ruleset with the a selector is supplied by some cms, and that you can't change it — instead, you need to create new rules to make the links look and behave like links, and for the user to be able to tell where they are in the list.
Backgrounds and borders - Learn web development
there are a few rules that need to be followed when writing background image shorthand values, for example: a background-color may only be specified after the final comma.
Test your skills: The Cascade - Learn web development
task one in this task, you need to use one of the special values we looked at in the controlling inheritance section to write a declaration in a new rule that will reset the background color back to white, without using an actual color value.
Test your skills: The Box Model - Learn web development
change the width of the second box by adding rules to the .alternate class, so that it matches the visual width of the first box.
Combinators - Learn web development
it will be hard to reuse the css rules as you have made the selector very specific to the location of that element in the markup.
Pseudo-classes and pseudo-elements - Learn web development
in the example above, you could write :first-child and the rule would apply to any element that is the first child of an <article> element, not just a paragraph first child — :first-child is equivalent to *:first-child.
Test your skills: Grid Layout - Learn web development
by editing the css rules for the two child elements, cause them to span over several grid tracks each; the second item should overlay the first as in the image below.
Responsive design - Learn web development
note: there is a css @ rule designed to replace the viewport meta tag — @viewport — however, it has poor browser support.
CSS layout - Learn web development
beginner's guide to media queries the css media query gives you a way to apply css only when the browser and device environment matches a rule that you specify, for example "viewport is wider than 480 pixels".
Use CSS to solve common problems - Learn web development
LearnCSSHowto
common use cases basics how to apply css to the dom how to use whitespace in css how to write comments in css how to select elements via element name, class or id how to select elements via attribute name and content how to use pseudo-classes how to use pseudo-elements how to apply multiple selectors to the same rule how to specify colors in css how to debug css in the browser css and text how to style text how to customize a list of elements how to style links how to add shadows to text boxes and layouts how to size css boxes how to control overflowing content how to control the part of a css box that the background is drawn under how do i define inline, block, and inline-block?
Fundamental text and font styling - Learn web development
it is a good idea to list all your font-size rulesets in a designated area in your stylesheet, so they are easy to find.
How can we design for all types of users? - Learn web development
modern browsers get around this rule by pretending that you're asking for "16 pixels when the user sets a zoom factor of 100%".
How much does it cost to do something on the Web? - Learn web development
as a rule of thumb, recognize that reliable, paid, personal hosting can cost around ten to fifteen dollars per month.
What are hyperlinks? - Learn web development
we'll talk about designing website navigation in another article, but as a rule, whenever you add a new webpage, make sure at least one of your other pages links to that new page.
What is accessibility? - Learn web development
in this article we give general accessibility principles and explain a few rules.
Client-side form validation - Learn web development
if the data entered in a form field follows all of the rules specified by the above attributes, it is considered valid.
How to build custom form controls - Learn web development
to that end, we will split our css work into two parts: the first part will be the css rules absolutely necessary to make our control behave like a <select> element, and the second part will consist of the fancy styles used to make it look the way we want.
CSS property compatibility table for form controls - Learn web development
rendering for each property there are two possible renderings: n (normal) indicates that the property is applied as it is t (tweaked) indicates that the property is applied with the extra rule below: * { /* turn off the native look and feel */ -webkit-appearance: none; appearance: none; /* for internet explorer */ background: none; } compatibility tables global behaviors some behaviors are common to many browsers at a global level: border, background, border-radius, height using one of these properties can partially or fully turn off the native look & feel of widgets ...
Dealing with files - Learn web development
some general rules for file paths: to link to a target file in the same directory as the invoking html file, just use the filename, e.g.
HTML basics - Learn web development
in the mists of time, when html was young (around 1991/92), doctypes were meant to act as links to a set of rules that the html page had to follow to be considered good html, which could mean automatic error checking and other useful things.
HTML Cheatsheet - Learn web development
l> i'm the first item i'm the second item a definition list <dl> <dt>a term</dt> <dd>definition of a term</dd> <dt>another term</dt> <dd>definition of another term</dd> </dl> a term definition of a term another term definition of another term a horizontal rule <hr> text heading <h1> this is heading 1 </h1> <h2> this is heading 2 </h2> <h3> this is heading 3 </h3> <h4> this is heading 4 </h4> <h5> this is heading 5 </h5> <h6> this is heading 6 </h6> this is heading 1 this is heading 2 this is heading 3 this is heading 4 this is heading 5 this is heading 6 ...
Getting started with HTML - Learn web development
when html was young (1991-1992), doctypes were meant to act as links to a set of rules that the html page had to follow to be considered good html.
HTML text fundamentals - Learn web development
here's the best rule of thumb: it's likely appropriate to use <b>, <i>, or <u> to convey a meaning traditionally conveyed with bold, italics, or underline, provided there is no more suitable element.
Adding vector graphics to the Web - Learn web development
you can assign classes and ids to svg elements and style them with css, either within the svg or wherever you put the css style rules for your html document.
From object to iframe — other embedding technologies - Learn web development
a good rule of thumb for web security is "you can never be too cautious.
HTML table advanced features and accessibility - Learn web development
if the <tbody> and <tfoot> elements weren't in place, you'd have to write much more complicated selectors/rules to apply the same styling.
Functions — reusable blocks of code - Learn web development
note: the same scoping rules do not apply to loop (e.g.
Manipulating documents - Learn web development
in this case we will set a class name of highlight on our paragraph: para.setattribute('class', 'highlight'); refresh your page, and you'll see no change — the css is still applied to the paragraph, but this time by giving it a class that is selected by our css rule, not as inline css styles.
Storing the information you need — Variables - Learn web development
try entering the following lines into your console: myname = 'bob'; myage = 40; an aside on variable naming rules you can call a variable pretty much anything you like, but there are limitations.
What is JavaScript? - Learn web development
css is a language of style rules that we use to apply styling to our html content, for example setting background colors and fonts, and laying out our content in multiple columns.
Adding features to our bouncing balls demo - Learn web development
in your css file, add the following rule at the bottom: p { position: absolute; margin: 0; top: 35px; right: 5px; color: #aaa; } in your javascript, make the following updates: create a variable that stores a reference to the paragraph.
CSS performance optimization - Learn web development
will-change: opacity, transform; the font-display property applied to the @font-face rule, the font-display property defines how font files are loaded and displayed by the browser, allowing text to appear with a fallback font while a font loads, or fails to load.
The business case for web performance - Learn web development
the budget can be applied to a single file, a file type, all files loaded on a page, a specific metric, or a threshold over a period of time.the budget reflects reachable goals; whehter they are time, quantity, or rule based.
Introduction to the server side - Learn web development
web frameworks are collections of functions, objects, rules and other code constructs designed to solve common problems, speed up development, and simplify the different types of tasks faced in a particular domain.
Componentizing our React app - Learn web development
react doesn’t have any hard rules for what is and isn’t a component – that’s up to you!
Getting started with React - Learn web development
use cases unlike the other frameworks covered in this module, react does not enforce strict rules around code conventions or file organization.
Componentizing our Svelte app - Learn web development
there are no hard rules for this.
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
a simple rule of thumb is that the name of the updated variable must appear on the left hand side of the assignment.
Getting started with Vue - Learn web development
you can use this to manage your linting rules.
Understanding client-side JavaScript frameworks - Learn web development
react doesn’t have any hard rules for what is and isn’t a component – that’s up to you!
Handling common JavaScript problems - Learn web development
declaring strict mode at the top of your javascript code causes it to be parsed with a stricter set of rules, meaning that more warnings and errors will be thrown, and some things will be disallowed that would otherwise be acceptable.
Git and GitHub - Learn web development
don't worry, even professional web developers find git confusing sometimes, and often solve problems by searching for solutions on the web, or consulting sites like flight rules for git and dangit, git!
Gecko info for Windows accessibility vendors
hresult get_attributesfornames( /* [in] */ unsigned short numattribs, /* [in] */ bstr __rpc_far *attribnames, /* [in] */ short __rpc_far *namespaceid, /* [out] */ bstr __rpc_far *attribvalues); the get_computedstyle method is used to find out the cumulative, computed results for all style rules applied to a node.
Software accessibility: Where are we today?
on a positive note, recent federal purchasing rules such as section 508 have caused many companies to pay attention and implement msaa support.
Adding a new event
although, a lot of existing members don't have "m" prefix, but you shouldn't use the legacy local rules.
Makefiles - Best practices and suggestions
prefer library rules whenever possible or create library rules that are missing.
Installing headers using EXPORTS
here is an example <tt>makefile.in</tt> which has both c++ and idl headers: module = content xpidl_module = content_base exports = \ nsicontent.h \ nsidocument.h \ nsistylesheet.h \ $(null) xpidlsrcs = \ nsicontentpolicy.idl \ nsiselectioncontroller.idl \ $(null) include $(topsrcdir)/config/rules.mk ...
Eclipse CDT Manual Setup
however, its default formats are not a good match to mozilla's style rules.
Commenting IDL for better documentation
following the rules below will ensure that our tools are able to produce the best possible results, and will have the added bonus of making your comments easier to read!
Interface development guide
idl interface rules design guidelines and rules when creating and changing xpcom interfaces.
mach
there are no hard or fast rules.
Cross Process Object Wrappers
so as a general rule, add-ons should avoid passing cpows into non-addon code.
Limitations of chrome scripts
so as a general rule, add-ons should avoid passing cpows into non-addon code.
Limitations of frame scripts
since frame and process scripts often execute in remote content processes these scripts are subject to the same file access rules placed on remote content.
Firefox UI considerations for web developers
providing a top sites ready icon the simple rule is to provide an icon which is at least 96x96 pixels in size, using a <link> element whose rel attribute is a reference to a file containing an icon of a supported type.
Script security
the rules for determining whether an object is same-origin with another, and what access is allowed cross-origin, are now mostly standardized across browsers.
Geckoview-Junit Tests
assumethat(sessionrule.env.isdebugbuild && sessionrule.env.cpuarch == "x86", equalto(false)) running tests on try to run these tests on try, use something like: mach try fuzzy -q geckoview-junit --artifact or mach try -b do -p android-x86_64 -u geckoview-junit --artifact currently, geckoview-junit is only run on android-x86_64.
Hacking with Bonsai
the rules no checkins when the tree is closed unless you are fixing a build problem at the request of a build person.
PBackground
ipdl protocols are used to specify how the chrome and content processes talk to each other and verify that a content process is "following the rules".
IPDL Tutorial
that means asynchonous protocols cannot declare a synchronous message without violating this type rule, while synchronous protocols can declare an asynchronous message.
Infallible memory allocation
choosing a memory allocator as you write new code that needs to allocate memory, there are some simple rules to follow to help you decide whether to use a fallible or an infallible memory allocator: if you're allocating what may be a large chunk of memory, you should allocate the memory fallibly (using malloc() for example), and check the result to be sure it's not null.
PromiseWorker.jsm
transferring special data from main thread to worker the regular rules of workers apply; special data of messageport and arraybuffer objects can be transferred as of firefox 40.
JavaScript code modules
pluralform.jsm supplies an easy way to get the correct plural forms for the current locale, as well as ways to localize to a specific plural rule.
SVN for Localizers
as a general rule, you should at least do it before translating anything.
Localization technical reviews
more intl.properties checkpoints, cont we also check the plural rule for the locale, that the general.useragent.locale is set to the locale code, that accept-lang shows the locale code(s) (like ab, ab-cd,...) and is followed by en and en-us, and finally that intl.menuitems.insertseparatorbeforeaccesskeys = true, where "true" should be left untranslated.
Extras
for example with the style rule: <code style="white-space: nowrap;">*[title] { color: blue; }</code> <math class="cue" display="block"> <mrow> <mrow> <msub title="base-a log"> <mi>log</mi> <mi>a</mi> </msub> <mo>&applyfunction;</mo> <mi>x</mi> </mrow> <mo>=</mo> <mfrac> <mrow> <mi title="natural log">ln</mi> <mo>&applyfunction;</mo> <mi>x</mi> </mrow> <mrow> <mi title="natural log">ln</mi> <mo>&applyfunction;</mo> <mi>a</mi> <...
Mozilla Port Blocking
"access to the port number given has been disabled for security reasons." "establishing a connection to an unsafe or otherwise banned port was prohibited" "0x804b0013 (ns_error_port_access_not_allowed)" if your product or web site uses a port which is blocked by mozilla's default port blocking rules, you can either change the port of your service to a unblocked value (recommended if possible) or ask your mozilla users to enable the port.
mozilla::MutexAutoLock
because of mozilla::mutexautounlock, the rule for determining if your code owns the mutex underlying the mutexautolock is slightly more complicated than that for monitorautoenter.
mozilla::MutexAutoUnlock
because of mozilla::mutexautolock, the rule for determining if your code does not own the mutex underlying the mutexautounlock is slightly more complicated than that for monitorautoenter.
Investigating CSS Performance
two counts are collected which allow for an estimation of the amount of work being done during restyle: resolvestyleforcount this is incremented everytime that we do style resolution on an element contentenumfunccount this is incremented roughly for every rule that we test against time during restyle can be spent in a bunch of places.
Memory reporting
a good rule of thumb: if you're calling the method via a pointer, you usually want the former, otherwise you want the latter.
about:memory
26.77 mb (100.0%) -- window-objects ├──14.59 mb (54.52%) -- layout │ ├───6.22 mb (23.24%) ── style-sets │ ├───4.00 mb (14.95%) ── pres-shell │ ├───1.79 mb (06.68%) ── frames │ ├───0.89 mb (03.33%) ── style-contexts │ ├───0.62 mb (02.33%) ── rule-nodes │ ├───0.56 mb (02.10%) ── pres-contexts │ ├───0.47 mb (01.75%) ── line-boxes │ └───0.04 mb (00.14%) ── text-runs ├───6.53 mb (24.39%) ── style-sheets ├───5.59 mb (20.89%) -- dom │ ├──3.39 mb (12.66%) ── element-nodes │ ├──1.56 mb (05.84%) ── text-nodes │ ├──0.54 mb (02.03%) ── other �...
Localization Use Cases
in l20n, the english string could be as simple as: <availablesize "{{ $size }} {{ $unit }} available"> on the other hand, the italian translation would make use of proper pluralization rules: <plural($n) { $n == 1 ?
Midas
inserthorizontalrule null/string (when string is the line's id) this command will insert a horizontal rule (line) at the insertion point.
NSPR Contributor Guide
generally useful platform abstractions you agree to sustain, bug fix may rely on the nspr api may not rely on any other library api new platform ports all nspr api items must be implemented platform specific headers in pr/include/md/_platformname.[h!cfg] platform specific code in pr/src/md/platform/*.c make rules in config/_platform.mk documentation the files for nspr's documentation are maintained using a proprietary word processing system [don't ask].
Date and Time
pr_msec_per_sec pr_usec_per_sec pr_nsec_per_sec pr_usec_per_msec pr_nsec_per_msec types and constants types and constants defined for nspr dates and times are: prtime prtimeparameters prexplodedtime time parameter callback functions in some geographic locations, use of daylight saving time (dst) and the rule for determining the dates on which dst starts and ends have changed a few times.
Introduction to NSPR
for example, suppose the defined rule of a function is that it should wait until there is an object available and that it should return a reference to that object.
PR_dtoa
1 like 0, but with steele & white stopping rule.
PR_strtod
ties are broken by the ieee round-even rule.
An overview of NSS Internals
it's worth mentioning the extended validation (ev) principle, which is an effort by software vendors and cas to define a stricter set of rules for issuing certificates for web site certificates.
FIPS Mode - an explanation
(fips sounds plural, but is singular; one fips document is a fips, not a fip.) fips documents define rules, regulations, and standards for many aspects of handling of information by computers and by people.
Index
it's worth mentioning the extended validation (ev) principle, which is an effort by software vendors and cas to define a stricter set of rules for issuing certificates for web site certificates.
NSS_3.12.1_release_notes.html
caller chooses encoding rules.
nss tech note1
this was written to be a generic decoder, that includes both der (distinguished encoding rules) and ber (basic encoding rules).† it handles both streaming and non-streaming input.
PKCS #11 Module Specs
nss="nss_params" nss_params are themselves name/value pairs, parsed with the same rules described above.
sslcrt.html
instead, it takes account of the following rules governing the construction of common names in ssl server certificates: * matches anything ?
sslerr.html
ssl_error_bad_cert_domain -12276 "unable to communicate securely with peer: requested domain name does not match the server's certificate." this error code should be returned by the certificate authentication callback function when it detects that the common name in the remote server's certificate does not match the hostname sought by the local client, according to the matching rules specified for cert_verifycertname.
GCIntegration - SpiderMonkey Redirect 1
overview before digging too deep, here are some quick rules of thumb for how to write code that will work smoothly with the gc regardless of changes that happen in the future.
GC Rooting Guide
if you use these types directly, or create classes, structs or arrays that contain them, you must follow the rules set out in this guide.
Index
rules for use: 70 js::stringvalue jsapi reference, reference, référence(2), spidermonkey js::stringvalue converts a given jsstring to js::value.
SpiderMonkey Internals
makefile.ref, rules.mk, config.mk, config/* obsolete spidermonkey standalone makefiles from 1.8 and earlier.
JSAPI User Guide
these access rules must be enforced somehow.
JS::SourceBufferHolder
rules for use: the data array must be allocated with js_malloc or js_realloc if ownership is being granted to the sourcebufferholder.
JSTraceOp
the only exception for this rule is the case when the embedding needs a tight integration with gc.
JS_ClearContextThread
the rules for using jscontexts in multiple threads are: each jscontext may only be used by one thread at a time.
JS_ParseJSON
the parsing rules applied by these methods are exactly those specified by ecmascript 5.
Zest
zest topics usecases reporting security vulnerabilities to developers reporting security vulnerabilities to companies defining active and passive scanner rules deep integration with security tools runtimes the runtime environments that support zest tools the tools that include support zest implementation the state of zest development videos simon demoed zest at appsec usa in november 2013, and the full video of my talk is available on youtube.
Handling Mozilla Security Bugs
expanding the mozilla security bug group as previously described, the mozilla security module owner can select one or more peers to share the core work of coordinating investigation and resolution of mozilla security vulnerabilities, and will work with them to create some agreed-upon ground rules for how this work can be most effectively shared among themselves.
Gecko Roles
role_ruler a ruler such as those used in word processors.
XForms Accessibility
at api accessible properties this section describes common rules how accessibility properties are formed for forms control elements.
Embedded Dialog API
it is probably easier to write css rules (a skin) to give gecko's xul dialogs the same appearance as the application's own.
Places utilities for JavaScript
wrapnode() string-wraps a result node according to the rules of the specified content type.
How to build an XPCOM component in JavaScript
epth)/config/autoconf.mk # module specifies where header files from this makefile are installed # use dom if your component implements a dom api module = dom # name of the typelib xpidl_module = dom_apps # set to 1 if the module should be part of the gecko runtime common to all applications gre_module = 1 # the idl sources xpidlsrcs = \ helloworld.idl \ $(null) include $(topsrcdir)/config/rules.mk xpidl_flags += \ -i$(topsrcdir)/dom/interfaces/base \ -i$(topsrcdir)/dom/interfaces/events \ $(null) creating the component using xpcomutils in firefox 3 and later you can use import xpcomutils.jsm using components.utils.import to simplify the process of writing your component slightly.
Finishing the Component
the rule of thumb is that interfaces outside of the sdk are considered "experimental" or unfrozen.
Starting WebLock
but in practice, manually declaring class methods in xpcom is the exception and not the rule.
Using XPCOM Utilities to Make Things Easier
note: nsisupports-warning note that ns_decl_isupports doesn't obey the general rule in which every interface has a declaration macro of the form ns_decl_interfacename, where interfacename is the name of the interface being compiled.
Components.utils.exportFunction
yname, contentwindow, { defineas: "changemyname" }); // less-privileged scope: for example, a page script var user = {name: "jim"}; var test = document.getelementbyid("test"); test.addeventlistener("click", function() { console.log(user.name); // "jim" window.changemyname(user); console.log(user.name); // "bill" }, false); note that this is subject to the normal rules of xrays: for example, an expando property added to a dom node will not be visible in the original object.
Observer Notifications
inspector-ruleview-ready - sent when the inspector's css rule view is opened and initialized.
nsIAccessibleRole
role_ruler 99 a ruler such as those used in word processors.
nsICategoryManager
("moz.httprulez.1") apersist no longer supported.
nsIChannel
any implementation of nsichannel must follow these rules.
getFile
this change was required in order to comply with apple's new gatekeeper v2 rules; without this change, firefox would not work on any mac os x newer than 10.9.4.
nsIDocShell
the rule of thumb here is that we disable js if this docshell or any of its parents disallow scripting, unless the only reason for js being disabled in this docshell is a parent docshell having a document that is in design mode.
nsIProtocolProxyFilter
method overview nsiproxyinfo applyfilter(in nsiprotocolproxyservice aproxyservice, in nsiuri auri, in nsiproxyinfo aproxy); methods applyfilter() this method is called to apply proxy filter rules for the given uri and proxy object (or list of proxy objects).
nsISecurityCheckedComponent
caps/idl/nsisecuritycheckedcomponent.idlscriptable provides methods that let an xpcom component define custom rules for accessing it from potentially unprivileged code.
nsIWebNavigation
for http and ftp urls and possibly others, characters above u+007f will be converted to utf-8 and then url- escaped per the rules of rfc 2396.
Performance
disk writes sqlite provides the basic acid rules of database theory: atomicity: each transaction is atomic and cannot be "partially" committed.
Working with out parameters
usage in order to use such a method from javascript via xpconnect, you have to follow a specific rule.
Xray vision
these rules are demonstrated in the script below, which evaluates a script in a sandbox, then examines the object attached to the sandbox.
MailNews Filters
how to add a filter action add your new action to nsimsgfilteraction add code to file out the new action here add new action to the rulesactiontable add string for the new action to the filter editor dtd file add new action to the filter editor js code add new action to the xbl widget in the filter editor if your action has a parameter, add code to initialize the ui editing an existing filter here and to save to the filter here add your action to filter.properties so it will show up in the filter log.
Zombie compartments
│ │ └──0.01 mb (00.00%) ── property-tables [2] │ │ ├───8.86 mb (01.78%) -- cached/window(https://www.google.de/?gws_rd=ssl) │ │ │ ├──4.23 mb (00.85%) -- layout │ │ │ │ ├──3.80 mb (00.76%) ── style-sets │ │ │ │ ├──0.29 mb (00.06%) ── pres-shell │ │ │ │ ├──0.05 mb (00.01%) ── rule-nodes │ │ │ │ ├──0.04 mb (00.01%) ── style-contexts │ │ │ │ ├──0.03 mb (00.01%) -- frames │ │ │ │ │ ├──0.02 mb (00.00%) ── sundries │ │ │ │ │ └──0.01 mb (00.00%) ── nsblockframe │ │ │ │ ├──0.01 mb (00.00%) ── pres-contexts │ │ │ │ ├──0.01 mb (00.00%) ──...
Standard OS Libraries
to call objective-c based api from ctypes, use the following functions in libobjc.dylib: objc_getclass to get class sel_registername to register selector name objc_msgsend and some variants to send message to class and instance objective-c code can be translated into c code by the following rule: // objective-c code nsevent loc = [nsevent mouselocation]; // pseudo c code nsevent loc = (nspoint)objc_msgsend(objc_getclass("nsevent"), sel_registername("mouselocation")); example: [nsevent mouselocation] components.utils.import("resource://gre/modules/ctypes.jsm"); let objc = ctypes.open(ctypes.libraryname("objc")); let id = ctypes.structtype("objc_ob...
Mozilla
android-specific test suites there are several android-specific test suites that run on the firefox for android codebase: api change rules until further notice, the following rules govern api changes: application cache implementation overview this happens in nshttpchannel::opencacheentry().
Drawing and Event Handling - Plugins
this happens when plug-ins are invoked with an html object element that has been hidden with css rules (see plug-in display modes in the introduction) or with an embed element whose hidden attribute has been set.
Gecko Plugin API Reference - Plugins
standing the runtime model plug-in detection how gecko finds plug-ins checking plug-ins by mime type overview of plug-in structure understanding the plug-in api plug-ins and platform independence windowed and windowless plug-ins the default plug-in using html to display plug-ins plug-in display modes using the object element for plug-in display nesting rules for html elements using the appropriate attributes using the embed element for plug-in display using custom embed attributes plug-in references plug-in development overview writing plug-ins registering plug-ins ms windows unix mac os x drawing a plug-in instance handling memory sending and receiving streams working with urls getting version and ui infor...
DOM Inspector internals - Firefox Developer Tools
mmandoverlay.xul chrome://inspector/content/viewers/d...andoverlay.xul chrome://inspector/content/keysetoverlay.xul chrome://inspector/content/viewers/d...setoverlay.xul chrome://inspector/content/statusbaroverlay.xul chrome://global/content/globaloverlay.xul (note that the overlays from the viewer subdirectories—viewers/dom and viewers/stylerules—are loaded as a result of overlay directives in dom inspector's chrome manifest, rather than being explicitly imported using a xul-overlay processing instruction in the overlaid file.) inspectoroverlay.xul this imports the scripts the top-level inspector needs, including dependencies.
Debugger.Frame - Firefox Developer Tools
the “immediate caller” rule means that, when debuggee code calls a non-debuggee function, it looks like a call to a primitive: you see a frame for the non-debuggee function that was accessible to the debuggee, but any further calls that function makes are treated as internal details, and omitted from the stack trace.
DevTools API - Firefox Developer Tools
for example, in the inspector, there are 3 tabs (computed view, rule view, layout view).
All keyboard shortcuts - Firefox Developer Tools
e search box in the css pane ctrl + f cmd + f ctrl + f clear search box content (only when the search box is focused, and content has been entered) esc esc esc step forward through properties and values tab tab tab step backward through properties and values shift + tab shift + tab shift + tab start editing property or value (rules view only, when a property or value is selected, but not already being edited) enter or space return or space enter or space cycle up and down through auto-complete suggestions (rules view only, when a property or value is being edited) up arrow , down arrow up arrow , down arrow up arrow , down arrow choose current auto-complete suggestion (rules view only, w...
Edit CSS filters - Firefox Developer Tools
css filter properties in the rules view have a circular gray and white swatch next to them: clicking the swatch opens a filter editor: the filter editor lists each of the effects performed by that filter on a separate line.
CSS Flexbox Inspector: Examine Flexbox layouts - Firefox Developer Tools
this header is a flex container: each navbar link is a flex item: the nav element within the header is both a flex item and a flex container which holds the navigation links: in the css pane in the css pane's rules view, any instance of a display: flex declaration gets a small flexbox icon next to the word flex.
Examine and edit the box model - Firefox Developer Tools
erlaid if you hover over an element's markup in the html pane: if the element is inline and is split over multiple line boxes, the highlighter shows each individual line box that together make up the element: the box model view when an element's selected, you can get a detailed look at the box model in the box model view: if you hover over a value, you'll see a tooltip telling you which rule the value comes from: if you hover over part of the box model in the box model view, the corresponding part of the page is highlighted: editing the box model you can also edit the values in the box model view, and see the results immediately in the page: ...
CSS Grid Inspector: Examine grid layouts - Firefox Developer Tools
in the css pane in the css pane's rules view, any instance of a display: grid declaration gets a grid icon included within it: .
Inspect and select colors - Firefox Developer Tools
in the css pane's rules view, if a rule contains a color value, you'll see a sample of the color next to the value: a color sample is also shown for css custom properties (variables) that represent colors.
Select an element - Firefox Developer Tools
this lets you see the rules for the element in the css pane, but conveniently select another element in the page.
Visualize transforms - Firefox Developer Tools
if you hover over a transform property in the rules view, you'll see the transformation overlaid in the page: ...
Page inspector keyboard shortcuts - Firefox Developer Tools
e search box in the css pane ctrl + f cmd + f ctrl + f clear search box content (only when the search box is focused, and content has been entered) esc esc esc step forward through properties and values tab tab tab step backward through properties and values shift + tab shift + tab shift + tab start editing property or value (rules view only, when a property or value is selected, but not already being edited) enter or space return or space enter or space cycle up and down through auto-complete suggestions (rules view only, when a property or value is being edited) up arrow , down arrow up arrow , down arrow up arrow , down arrow choose current auto-complete suggestion (rules view only, w...
Page Inspector - Firefox Developer Tools
you can split the rules view out into its own pane, separate from the other tabs on the css pane — this is called 3-pane mode.
Debugging Firefox Desktop - Firefox Developer Tools
if you want to debug a firefox instance from an external machine, you can change this option, but only do this on a trusted network or set a strong firewall rule to lock down which machines can access it.
Toolbox - Firefox Developer Tools
the following tools are not included in the toolbar by default, but you can add them in the settings: highlight painted area 3d view (note that this is not available in firefox 40) scratchpad grab a color from the page take a screenshot of the entire page: take a screenshot of the complete web page and saves it in your downloads directory toggle rulers for the page measure a portion of the page: measure a part of the website by selecting areas within the page toolbox controls finally there's a row of buttons to: close the window toggle the window between attached to the bottom of the browser window, and attached to the side of the browser window toggle the window between standalone and attached to the browser window access developer...
Console messages - Firefox Developer Tools
if the resource is a stylesheet, you will see the css rules, etc.
Firefox Developer Tools
rulers overlay horizontal and vertical rulers on a web page for the latest developer tools and features, try firefox developer edition.
CSS - Web APIs
WebAPICSS
css conditional rules module level 3the definition of 'css' in that specification.
CSSPseudoElement - Web APIs
(a style rule may be needed to add quotation marks in older browsers.) the example below demonstrates the basic properties of the csspseudoelement object representing the opening quotation mark.
CSSStyleDeclaration.getPropertyPriority() - Web APIs
example the following javascript code checks whether margin is marked as important in a css selector rule: var declaration = document.stylesheets[0].cssrules[0].style; var isimportant = declaration.getpropertypriority('margin') === 'important'; specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.getpropertypriority()' in that specification.
CSSStyleDeclaration.getPropertyValue() - Web APIs
example the following javascript code queries the value of the margin property in a css selector rule: var declaration = document.stylesheets[0].cssrules[0].style; var value = declaration.getpropertyvalue('margin'); // "1px 2px" specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.getpropertyvalue()' in that specification.
CSSStyleDeclaration.removeProperty() - Web APIs
example the following javascript code removes the background-color css property from a selector rule: var declaration = document.stylesheets[0].rules[0].style; var oldvalue = declaration.removeproperty('background-color'); specifications specification status comment css object model (cssom)the definition of 'cssstyledeclaration.removeproperty()' in that specification.
CSSValue.cssText - Web APIs
WebAPICSSValuecssText
example var styledeclaration = document.stylesheets[0].cssrules[0].style; var cssvalue = styledeclaration.getpropertycssvalue("color"); console.log(cssvalue.csstext); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalue.csstext' in that specification.
CSSValue.cssValueType - Web APIs
example var styledeclaration = document.stylesheets[0].cssrules[0].style; var cssvalue = styledeclaration.getpropertycssvalue("color"); console.log(cssvalue.cssvaluetype); specifications specification status comment document object model (dom) level 2 style specificationthe definition of 'cssvalue.cssvaluetype' in that specification.
CSS Counter Styles - Web APIs
interfaces csscounterstylerule represents an @counter-style rule.
Using the CSS Typed Object Model - Web APIs
roperty); // values const cssvalue = document.createelement('dd'); cssvalue.appendchild(document.createtextnode( allcomputedstyles.get(ofinterest[i]))); styleslist.appendchild(cssvalue); } we included border-left-color to demonstrate that, had we included all the properties, every value that defaults to currentcolor (including caret-color, outline-color, text-decoration-color, column-rule-color, etc.) would return rgb(255, 0, 0).
CanvasRenderingContext2D.stroke() - Web APIs
the stroke is drawn using the non-zero winding rule, which means that path intersections will still get filled.
CanvasRenderingContext2D - Web APIs
internet explorer canvasrenderingcontext2d.msfillrule the fill rule to use.
Hit regions and accessibility - Web APIs
aria rules accessible rich internet applications (aria) defines ways to make web content and web applications more accessible to people with disabilities.
Clipboard.read() - Web APIs
WebAPIClipboardread
note: the asynchronous clipboard and permissions apis are still in the process of being integrated into most browsers, so they often deviate from the official rules for permissions and the like.
Document.adoptNode() - Web APIs
best practice: although firefox doesn't currently enforce this rule, we encourage you to follow this rule for improved future compatibility.
Document.execCommand() - Web APIs
(not supported by internet explorer.) inserthorizontalrule inserts a <hr> element at the insertion point, or replaces the selection with it.
Document.importNode() - Web APIs
best practice: although firefox doesn't currently enforce this rule, we encourage you to follow this rule for improved future compatibility.
Document.readyState - Web APIs
console.log("the first css rule is: " + document.stylesheets[0].cssrules[0].csstext); break; } readystatechange as an alternative to domcontentloaded event // alternative to domcontentloaded event document.onreadystatechange = function () { if (document.readystate === 'interactive') { initapplication(); } } readystatechange as an alternative to load event // alternative to load event document.onreadystatechang...
Document Object Model (DOM) - Web APIs
svganimatedenumeration svganimatedinteger svganimatedlength svganimatedlengthlist svganimatednumber svganimatednumberlist svganimatedpathdata svganimatedpoints svganimatedpreserveaspectratio svganimatedrect svganimatedstring svganimatedtransformlist smil-related interfaces elementtimecontrol timeevent other svg interfaces getsvgdocument shadowanimation svgcolorprofilerule svgcssrule svgdocument svgexception svgexternalresourcesrequired svgfittoviewbox svglangspace svglocatable svgrenderingintent svgstylable svgtests svgtransformable svgunittypes svguseelementshadowroot svgurireference svgviewspec svgzoomandpan svgzoomevent specifications specification status comment dom living standard ...
Element.setAttribute() - Web APIs
boolean attributes are considered to be true if they're present on the element at all, regardless of their actual value; as a rule, you should specify the empty string ("") in value (some people use the attribute's name; this works but is non-standard).
ElementCSSInlineStyle.style - Web APIs
ute("style", "color:red; border: 1px solid blue;"); // set specific style while leaving other inline style values untouched elt.style.color = "blue"; getting style information the style property is not useful for completely learning about the styles applied on the element, since it represents only the css declarations set in the element's inline style attribute, not those that come from style rules elsewhere, such as style rules in the <head> section, or external style sheets.
EventTarget.addEventListener() - Web APIs
</table> note that the value of this inside a function, called by the code in the attribute value, behaves as per standard rules.
EventTarget.dispatchEvent() - Web APIs
the normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchevent().
Using files from web applications - Web APIs
consider this html: <input type="file" id="fileelem" multiple accept="image/*" class="visually-hidden"> <label for="fileelem">select some files</label> and this css: .visually-hidden { position: absolute !important; height: 1px; width: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); } /* separate rule for compatibility, :focus-within is required on modern firefox and chrome */ input.visually-hidden:focus + label { outline: thin dotted; } input.visually-hidden:focus-within + label { outline: thin dotted; } there is no need to add javascript code to call fileelem.click().
FontFace.stretch - Web APIs
WebAPIFontFacestretch
syntax var stretchdescriptor = fontface.stretch; fontface.stretch = stretchdescriptor; value a cssomstring containing a descriptor as it would be defined in a style sheet's @font-face rule.
FontFace.style - Web APIs
WebAPIFontFacestyle
syntax var style = fontface.style; fontface.style = value; value a cssomstring containing the descriptors defined in the style sheet's @font-face rule.
FontFace.unicodeRange - Web APIs
syntax var unicoderangedescriptor = fontface.unicoderange; fontface.unicoderange = unicoderangedescriptor; value a cssomstring containing a descriptor as it would appear in a style sheet's @font-face rule.
FontFace.variant - Web APIs
WebAPIFontFacevariant
syntax var variantsubproperty = fontface.variant; fontface.variant = variantsubproperty; value a cssomstring containing a descriptor as it would be defined in a style sheet's @font-face rule.
FontFace.weight - Web APIs
WebAPIFontFaceweight
syntax var weightdescriptor = fontface.weight; fontface.weight = weightdescriptor; value a cssomstring containing a descriptor as it would be defined in a style sheet's @font-face rule.
HTMLCanvasElement.getContext() - Web APIs
the khronos group certifies webgl implementations under certain conformance rules.
HTMLScriptElement - Web APIs
these algorithms describe the core ideas, but they rely on the parsing rules for <script> start and end tags in html, in foreign content, and in xml; the rules for the document.write() method; the handling of scripting; and so on.
HTMLSelectElement.selectedOptions - Web APIs
a string is constructed to list the ordered items, with logic to build the list using proper english grammar rules (including a serial comma).
HTMLStyleElement.type - Web APIs
for gecko, the type is most often given as "text/css." from the w3c spec on css: "the expectation is that binding-specific casting methods can be used to cast down from an instance of the cssrule interface to the specific derived interface implied by the type." syntax string = style.type; example if (newstyle.type != "text/css"){ // not supported!
HTMLTableElement.bgColor - Web APIs
the css background-color property should be used instead by modifying the element's style object or using a style rule.
IDBObjectStore.createIndex() - Web APIs
any sorting operations performed on the data via key ranges will then obey sorting rules of that locale (see locale-aware sorting.) you can specify its value in one of three ways: string: a string containing a specific locale code, e.g.
IndexedDB API - Web APIs
idblocaleawarekeyrange defines a key range that can be used to retrieve data from a database in a certain range, sorted according to the rules of the locale specified for a certain index (see createindex()'s optionalparameters.).
KeyboardEvent.charCode - Web APIs
when one or more modifier keys are pressed, there are some complex rules for charcode.
KeyboardEvent.key - Web APIs
WebAPIKeyboardEventkey
in sequence 1 & 3, the keyboardevent.key attribute is defined and is set appropriately to a value according to the rules defined ealier.
MediaStreamConstraints - Web APIs
streams isolated in this way can only be displayed in a media element (<audio> or <video>) where the content is protected just as if cors cross-origin rules were in effect.
Using the MediaStream Recording API - Web APIs
ition we want it to sit in by default, and give it a transition for smooth showing/hiding: aside { position: fixed; top: 0; left: 0; text-shadow: 1px 1px 1px black; width: 100%; height: 100%; transform: translatex(100%); transition: 0.6s all; background-color: #999; background-image: linear-gradient(to top right, rgba(0,0,0,0), rgba(0,0,0,0.5)); } last, we write a rule to say that when the checkbox is checked (when we click/focus the label), the adjacent <aside> element will have its horizontal translation value changed and transition smoothly into view: input[type=checkbox]:checked ~ aside { transform: translatex(0); } basic app setup to grab the media stream we want to capture, we use getusermedia().
MediaTrackConstraints.deviceId - Web APIs
an exception to the rule that device ids are the same across browsing sessions: private browsing mode will use a different id, and will change it each browsing session.
MediaTrackSettings.deviceId - Web APIs
an exception to the rule that device ids are the same across browsing sessions: private browsing mode will use a different id, and will change it each browsing session.
Navigator.requestMediaKeySystemAccess() - Web APIs
as a general rule, this function should be called only when it's about time to create and use a mediakeys object by calling the returned mediakeysystemaccess object's createmediakeys() method.
OffscreenCanvas.getContext() - Web APIs
the khronos group certifies webgl implementations under certain conformance rules.
Page Visibility API - Web APIs
windows are subjected to throttling after 30 seconds, with the same throttling delay rules as specified for window timers (again, see reasons for delays longer than specified).
PaintWorklet - Web APIs
<style> textarea { background-image: url(checkerboard); background-image: paint(checkerboard); } </style> <textarea></textarea> you can also use the @supports at-rule.
PannerNode.coneInnerAngle - Web APIs
to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector.
PannerNode.coneOuterAngle - Web APIs
to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector.
PannerNode.coneOuterGain - Web APIs
to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector.
PannerNode.orientationX - Web APIs
to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector.
PannerNode.orientationY - Web APIs
to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector.
PannerNode.orientationZ - Web APIs
to help us visualise how the orientation vector affects, we can use the right-hand rule: first, let's start by writing a utility function to figure out our orientation vector.
Request.destination - Web APIs
the destination is used by the user agent to, for example, help determine which set of rules to follow for cors purposes, or how to navigate any complicated code paths that affect how specific types of request get handled.
SVGGeometryElement.isPointInFill() - Web APIs
normal hit testing rules apply; the value of the pointer-events property on the element determines whether a point is considered to be within the fill.
SVGGeometryElement.isPointInStroke() - Web APIs
normal hit testing rules apply; the value of the pointer-events property on the element determines whether a point is considered to be within the stroke.
StyleSheetList - Web APIs
examples get document stylesheet objects with for loop for (let i = 0; i < document.stylesheets.length; i++) { let stylesheet = document.stylesheets[i]; } get all css rules for the document using array methods const allcss = [...document.stylesheets] .map(stylesheet => { try { return [...stylesheet.cssrules] .map(rule => rule.csstext) .join(''); } catch (e) { console.log('access to stylesheet %s is denied.
SubtleCrypto.importKey() - Web APIs
der is a set of rules for encoding asn.1 structures into a binary form.
URL - Web APIs
WebAPIURL
optional base parameter to use as a base if the url parameter is a relative url: const url = new url('../cats', 'http://www.example.com/dogs'); console.log(url.hostname); // "www.example.com" console.log(url.pathname); // "/cats" url properties can be set to construct the url: url.hash = 'tabby'; console.log(url.href); // "http://www.example.com/cats#tabby" urls are encoded according to the rules found in rfc 3986.
VTTCue - Web APIs
WebAPIVTTCue
text the raw text of the cue, and rules for its interpretation.
ValidityState - Web APIs
stepmismatch read only a boolean that is true if the value does not fit the rules determined by the step attribute (that is, it's not evenly divisible by the step value), or false if it does fit the step rule.
Boilerplate 1 - Web APIs
the css contains rules for body, canvas, and button.
Matrix math for the web - Web APIs
// create the matrix3d style property from a matrix array function matrixarraytocssmatrix(array) { return 'matrix3d(' + array.join(',') + ')'; } // grab the dom element let moveme = document.getelementbyid('move-me'); // returns a result like: "matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 50, 100, 0, 1);" let matrix3drule = matrixarraytocssmatrix(translationmatrix); // set the transform moveme.style.transform = matrix3drule; view on jsfiddle scale matrix a scale matrix makes something larger or smaller in one or more of the three dimensions: width, height, and depth.
Using textures in WebGL - Web APIs
note: it's important to note that the loading of textures follows cross-domain rules; that is, you can only load textures from sites for which your content has cors approval.
WebGL model view projection - Web APIs
more on that in the relevant wikipedia articles: cartesian coordinate system, right-hand rule.
Web Video Text Tracks Format (WebVTT) - Web APIs
in this case, you insert your css rules into the file with each rule preceded by the string "style" all by itelf on a line of text, as shown below: webvtt style ::cue { background-image: linear-gradient(to bottom, dimgray, lightgray); color: papayawhip; } /* style blocks cannot use blank lines nor "dash dash greater than" */ note comment blocks can be used between style blocks.
Using the Web Animations API - Web APIs
that’s impossible to do with css without recalculating durations in every css rule, but with the web animations api, we could use the document.getanimations() method to loop over each animation on the page and halve their playbackrates, like so: document.getanimations().foreach( function (animation) { animation.updateplaybackrate(animation.playbackrate * .5); } ); with the web animations api, all you need to change is just one little property!
Web Animations API Concepts - Web APIs
the internet explorer team requested an animations api to consolidate and normalize animation functionality across all browsers, and thus efforts began in earnest among mozilla firefox and google chrome developers to create the one animation spec to rule them all: the web animations api.
Web Audio API - Web APIs
learning coding is like playing cards — you learn the rules, then you play, then you go back and learn the rules again, then you play again.
Using the Web Speech API - Web APIs
public declares that it is a public rule, the string in angle brackets defines the recognised name for this term (color), and the list of items that follow the equals sign are the alternative values that will be recognised and accepted as appropriate values for the term.
Window.getDefaultComputedStyle() - Web APIs
the object is of the same type as the object returned by window.getcomputedstyle(), but only takes into account user-agent and user rules.
Window.open() - Web APIs
WebAPIWindowopen
new windows not opened by javascript cannot as a rule be closed by javascript.
WindowEventHandlers.onafterprint - Web APIs
in general, you should prefer the use of an @media print css at-rule, but it may be necessary to use these events in some cases.
WindowEventHandlers.onbeforeprint - Web APIs
in general, you should prefer the use of an @media print css at-rule, but it may be necessary to use these events in some cases.
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
the usual rules for setting the this keyword for the called function apply, and if you have not set this in the call or with bind, it will default to the window (or global) object.
XPathEvaluator.createExpression() - Web APIs
exceptions invalid_expression_err if the expression is not legal according to the rules of the xpathevaluator, an xpathexception of type invalid_expression_err is raised.
XPathEvaluator.evaluate() - Web APIs
exceptions invalid_expression_err if the expression is not legal according to the rules of the xpathevaluator, an xpathexception of type invalid_expression_err is raised.
XPathException - Web APIs
constants constant value description invalid_expression_err 51 if the expression has a syntax error or otherwise is not a legal expression according to the rules of the specific xpathevaluator or contains specialized extension functions or variables not supported by this implementation.
XPathExpression.evaluate() - Web APIs
exceptions invalid_expression_err if the expression is not legal according to the rules of the xpathevaluator, an xpathexception of type invalid_expression_err is raised.
XRBoundedReferenceSpace.boundsGeometry - Web APIs
as a general rule, with the origin for x and z located in or near the center of the space, and with the orientation set facing in a logical forward direction, as appropriate for the underlying platform or xr hardware.
XRInputSource.targetRayMode - Web APIs
the direction is determined using platform-specific rules, though if no such rules exist, the direction is chosen by assuming the user is pointing their index finger straight out from their hand.
XRInputSourceEventInit.frame - Web APIs
of course, as a general rule, you won't need to create xrinputsourceeventinit objects yourself.
XRInputSourceEventInit.inputSource - Web APIs
of course, as a general rule, you won't need to create xrinputsourceeventinit objects yourself.
XRTargetRayMode - Web APIs
the direction is determined using platform-specific rules, though if no such rules exist, the direction is chosen by assuming the user is pointing their index finger straight out from their hand.
Generating HTML - Web APIs
the third template has a general matching rule which will match any node and any attribute.
Web APIs
WebAPI
quadfilternode blob blobbuilder blobevent bluetooth bluetoothadvertisingdata bluetoothcharacteristicproperties bluetoothdevice bluetoothremotegattcharacteristic bluetoothremotegattdescriptor bluetoothremotegattserver bluetoothremotegattservice body broadcastchannel budgetservice budgetstate buffersource bytelengthqueuingstrategy bytestring c cdatasection css cssconditionrule csscounterstylerule cssgroupingrule cssimagevalue csskeyframerule csskeyframesrule csskeywordvalue cssmathproduct cssmathsum cssmathvalue cssmediarule cssnamespacerule cssnumericvalue cssomstring csspagerule csspositionvalue cssprimitivevalue csspseudoelement cssrule cssrulelist cssstyledeclaration cssstylerule cssstylesheet cssstylevalue csssupportsrule cssunitvalue css...
Using the aria-hidden attribute - Accessibility
this can improve the experience for assistive technology users by hiding: purely decorative content, such as icons or images duplicated content, such as repeated text offscreen or collapsed content, such as menus according to the fourth rule of aria, aria-hidden="true" should not be used on a focusable element.
ARIA: tabpanel role - Accessibility
the first rule of aria use is you can use a native feature with the semantics and behavior you require already built in, instead of re-purposing an element and adding an aria role, state or property to make it accessible, then do so.
ARIA: cell role - Accessibility
keyboard interactions none required javascript features the first rule of aria use is if you can use a native feature with the semantics and behavior you require already built in, instead of repurposing an element and adding an aria role, state or property to make it accessible, then do so.
ARIA: figure role - Accessibility
there are no hard and fast rules about how you should write your figure content.
ARIA: List role - Accessibility
there are no hard and fast rules about which elements you should use to markup the list and list items, but you should make sure that the list items make sense in the context of a list, e.g.
ARIA: Listitem role - Accessibility
there are no hard and fast rules about which elements you should use to markup the list and list items, but you should make sure that the list items make sense in the context of a list, e.g.
ARIA: row role - Accessibility
the first rule of aria use is you can use a native feature with the semantics and behavior you require already built in, instead of re-purposing an element and adding an aria role, state or property to make it accessible, then do so.
ARIA: rowgroup role - Accessibility
the first rule of aria use is if you can use a native feature with the semantics and behavior you require already built in, instead of re-purposing an element and adding an aria role, state or property to make it accessible, then do so.
ARIA: table role - Accessibility
the first rule of aria use is if you can use a native feature with the semantics and behavior you require already built in, instead of re-purposing an element and adding an aria role, state or property to make it accessible, then do so.
ARIA: listbox role - Accessibility
the first rule of aria use is you can use a native feature with the semantics and behavior you require already built in, instead of re-purposing an element and adding an aria role, state or property to make it accessible, then do so.
Keyboard - Accessibility
note: one important exception to this rule is if the element has role="document" applied to it, inside an interactive context (such as role="application").
-webkit-print-color-adjust - CSS: Cascading Style Sheets
exact background colors and images of the element to which this rule is applied are always printed, user's print settings are overridden.
::cue-region - CSS: Cascading Style Sheets
syntax ::cue-region | ::cue-region( <selector> ) permitted properties rules whose selectors include this element may only use the following css properties: background background-attachment background-clip background-color background-image background-origin background-position background-repeat background-size color font font-family font-size font-stretch font-style font-variant font-weight line-height opacity outline outline-color outline-style ...
::cue - CSS: Cascading Style Sheets
WebCSS::cue
syntax ::cue | ::cue( <selector> ) permitted properties rules whose selectors include this element may only use the following css properties: background background-attachment background-clip background-color background-image background-origin background-position background-repeat background-size color font font-family font-size font-stretch font-style font-variant font-weight line-height opacity outline outline-color outline-style ...
::grammar-error - CSS: Cascading Style Sheets
allowable properties only a small subset of css properties can be used in a rule with ::grammar-error in its selector: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow syntax ::grammar-error examples simple document grammar check in this example, eventual supporting browsers should highlight any flagged grammatical errors with the styles shown.
::marker - CSS: Cascading Style Sheets
WebCSS::marker
::marker { color: blue; font-size: 1.2em; } allowable properties only certain css properties can be used in a rule with ::marker as a selector: all font properties the white-space property color text-combine-upright, unicode-bidi and direction properties the content property all animation and transition properties the specification states that additional css properties may be supported in future.
::placeholder - CSS: Cascading Style Sheets
::placeholder { color: blue; font-size: 1.5em; } only the subset of css properties that apply to the ::first-line pseudo-element can be used in a rule using ::placeholder in its selector.
::spelling-error - CSS: Cascading Style Sheets
allowable properties only a small subset of css properties can be used in a rule with ::spelling-error in its selector: color background-color cursor caret-color outline and its longhands text-decoration and its associated properties text-emphasis-color text-shadow syntax ::spelling-error examples simple document spell check in this example, eventual supporting browsers should highlight any flagged spelling errors with the styles shown.
:active - CSS: Cascading Style Sheets
WebCSS:active
to style links appropriately, put the :active rule after all other link-related rules, as defined by the lvha-order: :link — :visited — :hover — :active.
:defined - CSS: Cascading Style Sheets
WebCSS:defined
element('div'); divelem.textcontent = this.getattribute('text'); let shadowroot = this.attachshadow({mode: 'open'}) .appendchild(divelem); } }) then insert a copy of this element into the document, along with a standard <p>: <simple-custom text="custom element example text"></simple-custom> <p>standard paragraph example text</p> in the css we first include the following rules: // give the two elements distinctive backgrounds p { background: yellow; } simple-custom { background: cyan; } // both the custom and the built-in element are given italic text :defined { font-style: italic; } then provide the following two rules to hide any instances of our custom element that are not defined, and display instances that are defined as block level elements: simple-cu...
:first - CSS: Cascading Style Sheets
WebCSS:first
the :first css pseudo-class, used with the @page at-rule, represents the first page of a printed document.
:fullscreen - CSS: Cascading Style Sheets
there are two rules here.
:hover - CSS: Cascading Style Sheets
WebCSS:hover
to style links appropriately, put the :hover rule after the :link and :visited rules but before the :active one, as defined by the lvha-order: :link — :visited — :hover — :active.
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
WebCSS:is
any paragraph inside a header, main or footer element that is being hovered */ :is(header, main, footer) p:hover { color: red; cursor: pointer; } /* the above is equivalent to the following */ header p:hover, main p:hover, footer p:hover { color: red; cursor: pointer; } /* backwards-compatible version with :-*-any() and :matches() (it is not possible to group selectors into single rule, because presence of invalid selector would invalidate whole rule.) */ :-webkit-any(header, main, footer) p:hover { color: red; cursor: pointer; } :-moz-any(header, main, footer) p:hover { color: red; cursor: pointer; } :matches(header, main, footer) p:hover { color: red; cursor: pointer; } syntax :is( <complex-selector-list> )where <complex-selector-list> = <complex-selector>#w...
:left - CSS: Cascading Style Sheets
WebCSS:left
the :left css pseudo-class, used with the @page at-rule, represents all left-hand pages of a printed document.
:link - CSS: Cascading Style Sheets
WebCSS:link
to style links appropriately, put the :link rule before all other link-related rules, as defined by the lvha-order: :link — :visited — :hover — :active.
:right - CSS: Cascading Style Sheets
WebCSS:right
the :right css pseudo-class, used with the @page at-rule, represents all right-hand pages of a printed document.
additive-symbols - CSS: Cascading Style Sheets
formal definition related at-rule@counter-styleinitial valuen/acomputed valueas specified formal syntax [ <integer> && <symbol> ]#where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
fallback - CSS: Cascading Style Sheets
formal definition related at-rule@counter-styleinitial valuedecimalcomputed valueas specified formal syntax <counter-style-name>where <counter-style-name> = <custom-ident> examples specifying a fallback counter style html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style fallback-example { system: fixed; symbols: "\24b6" "\24b7" "\24b8"; fallbac...
negative - CSS: Cascading Style Sheets
formal definition related at-rule@counter-styleinitial value"-" hyphen-minuscomputed valueas specified formal syntax <symbol> <symbol>?where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
pad - CSS: Cascading Style Sheets
formal definition related at-rule@counter-styleinitial value0 ""computed valueas specified formal syntax <integer> && <symbol>where <symbol> = <string> | <image> | <custom-ident>where <image> = <url> | <image()> | <image-set()> | <element()> | <paint()> | <cross-fade()> | <gradient>where <image()> = image( <image-tags>?
range - CSS: Cascading Style Sheets
formal definition related at-rule@counter-styleinitial valueautocomputed valueas specified formal syntax [ [ <integer> | infinite ]{2} ]# | auto examples setting counter style over a range <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> <li>six</li> <li>seven</li> <li>eight</li> <li>nine</li> <li>ten</li> </ul> @counter-style range-multi-example { system: cyclic; ...
speak-as - CSS: Cascading Style Sheets
let's talk about speech css | css tricks formal definition related at-rule@counter-styleinitial valueautocomputed valueas specified formal syntax auto | bullets | numbers | words | spell-out | <counter-style-name>where <counter-style-name> = <custom-ident> examples setting the spoken form for a counter html <ul class="list"> <li>one</li> <li>two</li> <li>three</li> <li>four</li> <li>five</li> </ul> css @counter-style speak-as-example { system: fixed...
font-display - CSS: Cascading Style Sheets
formal definition related at-rule@font-faceinitial valueautocomputed valueas specified formal syntax [ auto | block | swap | fallback | optional ] examples specifying fallback font-display @font-face { font-family: examplefont; src: url(/path/to/fonts/examplefont.woff) format('woff'), url(/path/to/fonts/examplefont.eot) format('eot'); font-weight: 400; font-style: normal; font-display: fallback; } specificat...
-webkit-transition - CSS: Cascading Style Sheets
instead, test for transition support using the css @supports at-rule, like this: @supports (transition: initial) { /* css to use if transitions are supported */ } obsolete example before this became obsolete, you could use -webkit-transition in your css like this: @media (-webkit-transition) { /* css to use if transitions are supported */ } specifications not part of any standard.
forced-colors - CSS: Cascading Style Sheets
color fill stroke text-decoration-color text-emphasis-color border-color outline-color column-rule-color scrollbar-color -webkit-tap-highlight-color box-shadow text-shadow you can use system color keywords with any property other than those listed above, to ensure that the rest of the page integrates with the restricted color palette available in forced colors mode.
height - CSS: Cascading Style Sheets
WebCSS@viewportheight
formal definition related at-rule@viewportinitial valueas each of the properties of the shorthand:min-height: automax-height: nonepercentagesas each of the properties of the shorthand:min-height: the percentage is calculated with respect to the height of the generated box's containing block.
min-width - CSS: Cascading Style Sheets
formal definition related at-rule@viewportinitial valueautopercentagesrefer to the width of the initial viewportcomputed valueif specified as a length, the corresponding absolute length; if specified as a percentage, the specified value; otherwise, auto formal syntax <viewport-length>where <viewport-length> = auto | <length-percentage>where <length-percentage> = <length> | <percentage> examples setting viewport min width in p...
orientation - CSS: Cascading Style Sheets
formal definition related at-rule@viewportinitial valueautopercentagesrefer to the size of bounding boxcomputed valueas specified formal syntax auto | portrait | landscape examples setting viewport orientation @viewport { orientation: landscape; } specifications specification status comment css device adaptationthe definition of '"orientation" descriptor' in that specification.
user-zoom - CSS: Cascading Style Sheets
mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | understanding wcag 2.0 formal definition related at-rule@viewportinitial valuezoompercentagesrefer to the size of bounding boxcomputed valueas specified formal syntax zoom | fixed examples disabling user zoom @viewport { user-zoom: fixed; } specifications specification status comment css device adaptationthe definition of '"user-zoom" descriptor' in that specification.
width - CSS: Cascading Style Sheets
WebCSS@viewportwidth
formal definition related at-rule@viewportinitial valueas each of the properties of the shorthand:min-width: automax-width: nonepercentagesas each of the properties of the shorthand:min-width: refer to the width of the containing blockmax-width: refer to the width of the containing blockcomputed valueas each of the properties of the shorthand:min-width: the percentage as specified or the absolute lengthmax-width: the percentage a...
Alternative style sheets - CSS: Cascading Style Sheets
no matter what style is selected, the rules from the reset.css stylesheet will always be applied.
Detecting CSS animation support - CSS: Cascading Style Sheets
style[ animationstring ] = 'rotate 1s linear infinite'; var keyframes = '@' + keyframeprefix + 'keyframes rotate { '+ 'from {' + keyframeprefix + 'transform:rotate( 0deg ) }'+ 'to {' + keyframeprefix + 'transform:rotate( 360deg ) }'+ '}'; if( document.stylesheets && document.stylesheets.length ) { document.stylesheets[0].insertrule( keyframes, 0 ); } else { var s = document.createelement( 'style' ); s.innerhtml = keyframes; document.getelementsbytagname( 'head' )[ 0 ].appendchild( s ); } } this code looks at the value of animation; if it's false, we know we need to use our javascript fallback code to perform our animation.
Mastering margin collapsing - CSS: Cascading Style Sheets
these rules apply even to margins that are zero, so the margin of a descendant ends up outside its parent (according to the rules above) whether or not the parent's margin is zero.
CSS Basic Box Model - CSS: Cascading Style Sheets
this article describes the rules that govern when and why this happens, and how to control it.
CSS Charsets - CSS: Cascading Style Sheets
reference at-rules @charset specifications specification status comment css level 2 (revision 1)the definition of '@charset' in that specification.
Basic Concepts of Multicol - CSS: Cascading Style Sheets
the properties defined by the specification are: column-width column-count columns column-rule-color column-rule-style column-rule-width column-rule column-span column-fill column-gap by adding column-count or column-width to an element, that element becomes a multi-column container, or multicol container for short.
CSS Counter Styles - CSS: Cascading Style Sheets
reference properties counter-increment counter-reset at-rules @counter-style system additive-symbols negative prefix suffix range pad speak-as fallback guides using css counters describes how to use counters to number any html element or to perform complex counting.
CSS Device Adaptation - CSS: Cascading Style Sheets
reference at-rules @viewport specifications specification status comment css device adaptation working draft initial definition ...
Aligning Items in a Flex Container - CSS: Cascading Style Sheets
while this may all seem a little confusing, the rule to remember is that unless you do something to change it, flex items lay themselves out in the direction that words are laid out in the language of your document along the inline, row axis.
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
if you decide the ie11 implementation is too buggy and you wish to serve it the fallback layout then you could use feature queries to serve flexbox rules only to those browsers with good flexbox support.
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
as a rule of thumb, if you are adding widths to flex items in order to make items in one row of a wrapped flex container line up with the items above them you really want two-dimensional layout.
Block and inline layout in normal flow - CSS: Cascading Style Sheets
the display property and flow layout in addition to the rules existing in css2.1, new levels of css further describe the behaviour of block and inline boxes.
In Flow and Out of Flow - CSS: Cascading Style Sheets
the box of our paragraph is still displaying according to the rules of normal flow.
OpenType font features guide - CSS: Cascading Style Sheets
in this example you can see two different typefaces, and the introduction of the @font-feature-values at-rule.
CSS Fonts - CSS: Cascading Style Sheets
WebCSSCSS Fonts
nce properties font font-family font-feature-settings font-kerning font-language-override font-optical-sizing font-size font-size-adjust font-stretch font-style font-synthesis font-variant font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric font-variant-position font-variation-settings font-weight line-height at-rules @font-face font-family font-feature-settings font-style font-variant font-weight font-stretch src unicode-range @font-feature-values guides fundamental text and font styling in this beginner's learning article we go through all the basic fundamentals of text/font styling in detail, including setting font weight, family and style, font shorthand, text alignme...
Implementing image sprites in CSS - CSS: Cascading Style Sheets
for example: #btn1 { background-position: -20px 0px; } #btn2 { background-position: -40px 0px; } this would move the element with the id 'btn1' 20 pixels to the left and the element with the id 'btn2' 40 pixels to the left (assuming they have the class toolbtn assigned and are affected by the image rule above).
Using CSS counters - CSS: Cascading Style Sheets
counters are, in essence, variables maintained by css whose values may be incremented by css rules to track how many times they're used.
CSS Masking - CSS: Cascading Style Sheets
reference properties clip clip-path clip-rule mask mask-border mask-border-mode mask-border-outset mask-border-repeat mask-border-slice mask-border-source mask-border-width mask-clip mask-composite mask-image mask-mode mask-origin mask-position mask-repeat mask-size mask-type specifications specification status comment css masking module level 1 candidate recommendation scalable vector graphics (svg) 1.1 (second edition)the definition of 'mask' in that specification.
CSS Namespaces - CSS: Cascading Style Sheets
reference at-rules @namespace specifications specification status comment css namespaces module recommendation initial definition ...
CSS Paged Media - CSS: Cascading Style Sheets
WebCSSCSS Pages
reference css properties page-break-after page-break-before page-break-inside at-rules @page pseudo-classes :blank :first :left :right specifications specification status comment css paged media module level 3 working draft css fragmentation module level 3 candidate recommendation css level 2 (revision 1) recommendation ...
Using z-index - CSS: Cascading Style Sheets
if several elements share the same z-index value (i.e., they are placed on the same layer), stacking rules explained in the section stacking without the z-index property apply.
Stacking with floated blocks - CSS: Cascading Style Sheets
this behavior can be shown with an added rule to the above list: the background and borders of the root element descendant non-positioned blocks, in order of appearance in the html floating blocks descendant non-positioned inline elements descendant positioned elements, in order of appearance in the html note: if an opacity value is applied to the non-positioned block (div #4), then something strange happens: the background and b...
Stacking context example 2 - CSS: Cascading Style Sheets
you can see that div #2 (z-index: 2) is above div #3 (z-index: 1), because they both belong to the same stacking context (the root one), so z-index values rule how elements are stacked.
The stacking context - CSS: Cascading Style Sheets
within a stacking context, child elements are stacked according to the same rules previously explained.
CSS Scrollbars - CSS: Cascading Style Sheets
baseline rules for scrollbar usability | adrian roselli browser compatibility the compatibility table in this page is generated from structured data.
CSS selectors - CSS: Cascading Style Sheets
css selectors define the elements to which a set of css rules apply.
Using CSS transforms - CSS: Cascading Style Sheets
as a rule of thumb, an element is positioned by the box model if it has display: block.
Animatable CSS properties - CSS: Cascading Style Sheets
rder-radius border-right border-right-color border-right-width border-start-end-radius border-start-start-radius border-top border-top-color border-top-left-radius border-top-right-radius border-top-width border-width bottom box-shadow caret-color clip clip-path color column-count column-gap column-rule column-rule-color column-rule-width column-width columns filter flex flex-basis flex-grow flex-shrink font font-size font-size-adjust font-stretch font-variation-settings font-weight gap grid-column-gap grid-gap grid-row-gap grid-template-columns grid-template-rows height inline-size...
Questions about CSS - CSS: Cascading Style Sheets
WebCSSFAQ
cascading style sheets (css) is a rule-based language allowing developers to define styles to apply to html elements (or other markup structures).
Breadcrumb Navigation - CSS: Cascading Style Sheets
this could also be achieved using one selector only: .breadcrumb li:not(:first-child)::before { content: "→"; } this solution uses a more complex selector, but requires less rules.
Card - CSS: Cascading Style Sheets
this would be a reasonable way to lay out the card, although i have a slight preference for being able to control the tracks from the container rather than needing to add rules to the items.
Privacy and the :visited selector - CSS: Cascading Style Sheets
only the following styles can be applied to visited links: color background-color border-color (and its sub-properties) column-rule-color outline-color the color parts of the fill and stroke attributes in addition, even for the above styles, you won't be able to change the transparency between unvisited and visited links, as you otherwise would be able to using rgba(), hsla(), or the transparent keyword.
Pseudo-elements - CSS: Cascading Style Sheets
note: as a rule, double colons (::) should be used instead of a single colon (:).
Selector list - CSS: Cascading Style Sheets
nt, article { font-size: 1.1em; } selector list invalidation a downside to using selector lists is that the following aren't equivalent: h1 { font-family: sans-serif } h2:maybe-unsupported { font-family: sans-serif } h3 { font-family: sans-serif } h1, h2:maybe-unsupported, h3 { font-family: sans-serif } this is because a single unsupported selector in a selector list invalidates the whole rule.
Viewport concepts - CSS: Cascading Style Sheets
see also @viewport css at-rule visual viewport api <meta>, specifically <meta name="viewport"> using the viewport meta tag to control layout on mobile browsers ...
WebKit CSS extensions - CSS: Cascading Style Sheets
t-background-origin -webkit-background-size -webkit-border-bottom-left-radius -webkit-border-bottom-right-radius -webkit-border-image -webkit-border-radius -webkit-border-top-left-radius -webkit-border-top-right-radius -webkit-box-decoration-break -webkit-box-shadow -webkit-box-sizing c -webkit-clip-path -webkit-column-count -webkit-column-fill -webkit-column-gap -webkit-column-rule -webkit-column-rule-color -webkit-column-rule-style -webkit-column-rule-width -webkit-column-span -webkit-column-width -webkit-columns f -webkit-filter -webkit-flex -webkit-flex-basis -webkit-flex-direction -webkit-flex-flow -webkit-flex-grow -webkit-flex-shrink -webkit-flex-wrap -webkit-font-feature-settings -webkit-font-kerning -webkit-font-variant-ligatures g-j -webki...
animation-name - CSS: Cascading Style Sheets
the animation-name css property specifies the names of one or more @keyframes at-rules describing the animation or animations to apply to the element.
animation-timing-function - CSS: Cascading Style Sheets
th); animation-timing-function: steps(6, start); animation-timing-function: steps(8, end); /* multiple animations */ animation-timing-function: ease, step-start, cubic-bezier(0.1, 0.7, 1.0, 0.1); /* global values */ animation-timing-function: inherit; animation-timing-function: initial; animation-timing-function: unset; timing functions may be specified on individual keyframes in a @keyframes rule.
aspect-ratio - CSS: Cascading Style Sheets
in firefox, the internal stylesheet rule looks like this: img, input[type="image"], video, embed, iframe, marquee, object, table { aspect-ratio: attr(width) / attr(height); } specifications specification status comment css box sizing module level 4the definition of 'aspect-ratio' in that specification.
border-image-repeat - CSS: Cascading Style Sheets
ax [ stretch | repeat | round | space ]{1,2} examples repeating border images css #bordered { width: 12rem; margin-bottom: 1rem; padding: 1rem; border: 40px solid; border-image: url("https://mdn.mozillademos.org/files/4127/border.png") 27; border-image-repeat: stretch; /* can be changed in the live sample */ } html <div id="bordered">you can try out various border repetition rules on me!</div> <select id="repetition"> <option value="stretch">stretch</option> <option value="repeat">repeat</option> <option value="round">round</option> <option value="space">space</option> <option value="stretch repeat">stretch repeat</option> <option value="space round">space round</option> </select> javascript var repetition = document.getelementbyid("repetition"); repetitio...
break-after - CSS: Cascading Style Sheets
to determine if a break must be done, the following rules are applied: if any of the three concerned values is a forced break value (always, left, right, page, column, or region), it has precedence.
break-before - CSS: Cascading Style Sheets
to determine if a break must be done, the following rules are applied: if any of the three concerned values is a forced break value (always, left, right, page, column, or region), it has precedence.
break-inside - CSS: Cascading Style Sheets
to determine if a break must be done, the following rules are applied: if any of the three concerned values is a forced break value (always, left, right, page, column, or region), it has precedence.
calc() - CSS: Cascading Style Sheets
WebCSScalc
the expression can be any simple expression combining the following operators, using standard operator precedence rules: + addition.
clamp() - CSS: Cascading Style Sheets
WebCSSclamp
the expression can be values combining the addition ( + ), subtraction ( - ), multiplication ( * ) and division ( / ) operators, using standard operator precedence rules.
column-fill - CSS: Cascading Style Sheets
</p> css .content-box { column-count: 4; column-rule: 1px solid black; column-fill: balance; } result specifications specification status comment css multi-column layout modulethe definition of 'column-fill' in that specification.
column-width - CSS: Cascading Style Sheets
in horizontal text these are width, column-width, column-gap, and column-rule-width.
conic-gradient() - CSS: Cascading Style Sheets
note: rendering of color stops in css gradients follows the same rules as color stops in svg gradients.
env() - CSS: Cascading Style Sheets
WebCSSenv
in media query rules).
float - CSS: Cascading Style Sheets
WebCSSfloat
this was an exception to the rule, that the name of the dom member is the camel-case name of the dash-separated css name (due to the fact that "float" is a reserved word in javascript, as seen in the need to escape "class" as "classname" and escape <label>'s "for" as "htmlfor").
font-family - CSS: Cascading Style Sheets
the browser will select the first font in the list that is installed or that can be downloaded using a @font-face at-rule.
font-language-override - CSS: Cascading Style Sheets
for instance, if a typeface doesn't have proper rules for the azeri language, you can force the font to use turkish glyphs, which follow similar rules.
font-variant-alternates - CSS: Cascading Style Sheets
ant(user-defined-ident); font-variant-alternates: swash(user-defined-ident); font-variant-alternates: ornaments(user-defined-ident); font-variant-alternates: annotation(user-defined-ident); font-variant-alternates: swash(ident1) annotation(ident2); /* global values */ font-variant-alternates: initial; font-variant-alternates: inherit; font-variant-alternates: unset; the @font-feature-values at-rule can define names for alternative glyph functions (stylistic, styleset, character-variant, swash, ornament or annotation), associating the name with opentype parameters.
font-variant-caps - CSS: Cascading Style Sheets
language-specific rules this property accounts for language-specific case mapping rules.
font-weight - CSS: Cascading Style Sheets
fallback weights if the exact weight given is unavailable, then the following rule is used to determine the weight actually rendered: if the target weight given is between 400 and 500 inclusive: look for available weights between the target and 500, in ascending order.
line-height-step - CSS: Cascading Style Sheets
:root { font-size: 12pt; --my-grid: 18pt; line-height-step: var(--my-grid); } h1 { font-size: 20pt; margin-top: calc(2 * var(--my-grid)); } the result of these rules is shown below in the following screenshot: specifications specification status comment css rhythmic sizingthe definition of 'line-height-step' in that specification.
line-height - CSS: Cascading Style Sheets
it also applies to ::first-letter and ::first-line.inheritedyespercentagesrefer to the font size of the element itselfcomputed valuefor percentage and length values, the absolute length, otherwise as specifiedanimation typeeither number or length formal syntax normal | <number> | <length> | <percentage> examples basic example /* all rules below have the same resultant line height */ div { line-height: 1.2; font-size: 10pt; } /* number/unitless */ div { line-height: 1.2em; font-size: 10pt; } /* length */ div { line-height: 120%; font-size: 10pt; } /* percentage */ div { font: 10pt/1.2 georgia,"bitstream charter",serif; } /* font shorthand */ it is often more convenient to set line-height by using the font shorthand as ...
linear-gradient() - CSS: Cascading Style Sheets
note: rendering of color stops in css gradients follows the same rules as color stops in svg gradients.
margin-trim - CSS: Cascading Style Sheets
-color: red; margin: 20px; padding: 20px; display: inline-block; } article > span { background-color: black; color: white; text-align: center; padding: 10px; margin-right: 20px; } the problem here is that you'd end up with 20px too much spacing at the right of the row, so you'd maybe do this to fix it: span:last-child { margin-right: 0; } it is a pain having to write another rule to achieve this, and it is also not very flexible.
max() - CSS: Cascading Style Sheets
WebCSSmax
the expression can be values combining the addition ( + ), subtraction ( - ), multiplication ( * ) and division ( / ) operators, using standard operator precedence rules.
min() - CSS: Cascading Style Sheets
WebCSSmin
the expression can be values combining the addition ( + ), subtraction ( - ), multiplication ( * ) and division ( / ) operators, using standard operator precedence rules.
repeating-conic-gradient() - CSS: Cascading Style Sheets
note: rendering of color stops in css gradients follows the same rules as color stops in svg gradients.
repeating-linear-gradient() - CSS: Cascading Style Sheets
note: rendering of color stops in css gradients follows the same rules as color stops in svg gradients.
Specified value - CSS: Cascading Style Sheets
the specified value for a given property is determined according to the following rules: if the document's style sheet explicitly specifies a value for the property, the given value will be used.
text-emphasis-position - CSS: Cascading Style Sheets
in html, this can be done with the following style rule: ruby { text-emphasis: none; } preferring emphasis marks over ruby some other editors prefer to hide ruby when they conflict with emphasis marks.
text-transform - CSS: Cascading Style Sheets
the text-transform property takes into account language-specific case mapping rules such as the following: in turkic languages, like turkish (tr), azerbaijani (az), crimean tatar (crh), volga tatar (tt), and bashkir (ba), there are two kinds of i, with and without the dot, and two case pairings: i/İ and ı/i.
transform-box - CSS: Cascading Style Sheets
svg{ width:80vh; border:1px solid #d9d9d9; position:absolute; margin: auto; top: 0; right: 0; bottom: 0; left: 0; } #box{ transform-origin:50% 50%; /*+++++++++++++++++++++++++++*/ /* if i remove this rule the pen won't work properly on chrome for mac, ff, safari will still work properly on chrome for pc & opera*/ transform-box: fill-box; /*alternatively i can use transform-origin:15px 15px;*/ /*+++++++++++++++++++++++++++*/ animation: rotatebox 3s linear infinite; } @keyframes rotatebox { to { transform: rotate(360deg); } full credit for this example goes to pogany; see this c...
unicode-bidi - CSS: Cascading Style Sheets
the directionality is calculated using the p2 and p3 rules of the unicode bidirectional algorithm.
url() - CSS: Cascading Style Sheets
WebCSSurl()
e: url("/media/diamonds.png") 30 fill / 30px / 30px space; /* as a parameter in another css function */ background-image: cross-fade(20% url(first.png), url(second.png)); mask-image: image(url(mask.png), skyblue, linear-gradient(rgba(0, 0, 0, 1.0), transparent); /* as part of a non-shorthand multiple value */ content: url(star.svg) url(star.svg) url(star.svg) url(star.svg) url(star.svg); /* at-rules */ @document url("https://www.example.com/") { ...
word-break - CSS: Cascading Style Sheets
values normal use the default line break rule.
Setting up adaptive streaming media sources - Developer guides
note: since mpeg-dash decoding is done partially using javascript and mse files are often grabbed using xhr, keep same origin rules in mind.
Video player styling basics - Developer guides
there are some browser-specific properties that need to be set to ensure that firefox and chrome use the required colour for the progress bar: .controls progress::-moz-progress-bar { background-color:#0095dd; } .controls progress::-webkit-progress-value { background-color:#0095dd; } although the same properties are set to the same value, these rules need to be defined separately, otherwise chrome ignores it.
Block formatting context - Developer guides
see also float, clear css key concepts: css syntax, at-rule, comments, specificity and inheritance, the box, layout modes and visual formatting models, and margin collapsing, or the initial, computed, resolved, specified, used, and actual values.
Rich-Text Editing in Mozilla - Developer guides
internet explorer differences one major difference between mozilla and internet explorer that affects designmode is the generated code in the editable document: while internet explorer uses html tags (em, i, etc), mozilla 1.3 will generate by default spans with inline style rules.
HTML5 - Developer guides
WebGuideHTMLHTML5
custom typefaces can be downloaded and applied thanks to the new @font-face at-rule.
A hybrid approach - Developer guides
similarly, because it uses user-agent detection, you will have to update your detection rules as time goes on.
Writing forward-compatible websites - Developer guides
a good example, for a browser vendor using the -vnd css prefix that has shipped an unprefixed implementation of the make-it-pretty property, with a behavior for the value "sometimes" that differs from the prefixed version: <style> .pretty-element { -vnd-make-it-pretty: sometimes; make-it-pretty: sometimes; } </style> the order of the declarations in the rule above is important: the unprefixed one needs to come last.
Block-level elements - HTML: Hypertext Markup Language
<hr> horizontal rule (dividing line).
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
if the foreign content comes from an image obtained from either as htmlcanvaselement or imagebitmap, and the image source doesn't meet the same origin rules, attempts to read the canvas's contents are blocked.
Date and time formats used in HTML - HTML: Hypertext Markup Language
there are some additional basic rules: the hour is always specified using the 24-hour clock, with 00 being midnight and 11 pm being 23.
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
WebHTMLElementbdi
though the same visual effect can be achieved using the css rule unicode-bidi: isolate on a <span> or another text-formatting element, html authors should not use this approach because it is not semantic and browsers are allowed to ignore css styling.
<code>: The Inline Code element - HTML: Hypertext Markup Language
WebHTMLElementcode
a css rule can be defined for the code selector to override the browser's default font face.
<colgroup> - HTML: Hypertext Markup Language
WebHTMLElementcolgroup
note: this attribute is applied on the attributes of the column group, it has no effect on the css styling rules associated with it or, even more, to the cells of the column's members of the group.
<dfn>: The Definition element - HTML: Hypertext Markup Language
WebHTMLElementdfn
specifying the term being defined the term being defined is identified following these rules: if the <dfn> element has a title attribute, the value of the title attribute is considered to be the term being defined.
<input type="range"> - HTML: Hypertext Markup Language
WebHTMLElementinputrange
as a rule, if the user is more likely to be interested in the percentage of the distance between minimum and maximum values than the actual number itself, a range input is a great candidate.
<input type="search"> - HTML: Hypertext Markup Language
WebHTMLElementinputsearch
as a general rule, you should avoid using them unless it can't be helped.
<input type="tel"> - HTML: Hypertext Markup Language
WebHTMLElementinputtel
as a general rule, you should avoid using them unless it can't be helped.
<input type="text"> - HTML: Hypertext Markup Language
WebHTMLElementinputtext
as a general rule, you should avoid using them unless it can't be helped.
<input type="url"> - HTML: Hypertext Markup Language
WebHTMLElementinputurl
as a general rule, you should avoid using them unless it can't be helped.
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
font css @font-face image <img> and <picture> elements with srcset or imageset attributes, svg <image> elements, css *-image rules object <object> elements script <script> elements, worker importscripts style <link rel=stylesheet> elements, css @import track <track> elements video <video> elements worker worker, sharedworker crossorigin this enumerated attribute indicates whether cors must be used when fetching the r...
<q>: The Inline Quotation element - HTML: Hypertext Markup Language
WebHTMLElementq
a style rule may be needed to add quotation marks in older browsers.
<samp>: The Sample Output element - HTML: Hypertext Markup Language
WebHTMLElementsamp
usage notes you can use a css rule to override the browser's default font face for the <samp> element; however, it's possible that the browser's preferences may take precedence over any css you specify.
<section>: The Generic Section element - HTML: Hypertext Markup Language
WebHTMLElementsection
a rule of thumb is that a section should logically appear in the outline of a document.
<tt>: The Teletype Text element (obsolete) - HTML: Hypertext Markup Language
WebHTMLElementtt
you can override this using css by creating a rule using the tt selector, as seen in the example overriding the default font above.
<ul>: The Unordered List element - HTML: Hypertext Markup Language
WebHTMLElementul
as a rule of thumb to determine which one to use, try changing the order of the list items; if the meaning is changed, the <ol> element should be used, otherwise you can use <ul>.
<wbr> - HTML: Hypertext Markup Language
WebHTMLElementwbr
the html <wbr> element represents a word break opportunity—a position within text where the browser may optionally break a line, though its line-breaking rules would not otherwise create a break at that location.
HTML elements reference - HTML: Hypertext Markup Language
WebHTMLElement
<wbr> the html <wbr> element represents a word break opportunity—a position within text where the browser may optionally break a line, though its line-breaking rules would not otherwise create a break at that location.
data-* - HTML: Hypertext Markup Language
the * may be replaced by any name following the production rule of xml names with the following restrictions: the name must not start with xml, whatever case is used for these letters; the name must not contain any semicolon (u+003a); the name must not contain capital letters.
itemprop - HTML: Hypertext Markup Language
note: the rules above disallow ":" characters in non-url values because otherwise they could not be distinguished from urls.
itemtype - HTML: Hypertext Markup Language
it is left to such specifications to define whether multiple items of the same global identifier (whether on the same page or different pages) are allowed to exist, and what processing rules for that vocabulary are, with respect to handling the case of multiple items with the same id.
Identifying resources on the Web - HTTP
each web server has its own rules regarding parameters, and the only reliable way to know how a specific web server is handling parameters is by asking the web server owner.
MIME types (IANA media types) - HTTP
note: use application/xml or application/xhtml+xml if you want xml’s strict parsing rules, <![cdata[…]]> sections, or elements that aren't from html/svg/mathml namespaces.
Browser detection using the user agent - HTTP
the following table summarizes the way major browser vendors indicate that their browsers are running on a mobile device: common browsers user agent strings browser rule example mozilla (gecko, firefox) mobile or tablet token in the comment.
CORS errors - HTTP
WebHTTPCORSErrors
if the cors configuration isn't setup correctly, the browser console will present an error like "cross-origin request blocked: the same origin policy disallows reading the remote resource at $somesite" indicating that the request was blocked due to violating the cors security rules.
Cache-Control - HTTP
header type general header forbidden header name no cors-safelisted response header yes syntax caching directives have the following rules to be valid: case-insensitive, but lowercase is recommended.
Content-Disposition - HTTP
the filename is always optional and must not be used blindly by the application: path information should be stripped, and conversion to the server file system rules should be done.
CSP: style-src - HTTP
if 'unsafe-eval' isn't specified with the style-src directive, the following methods are blocked and won't have any effect: cssstylesheet.insertrule() cssgroupingrule.insertrule() cssstyledeclaration.csstext specifications specification status comment content security policy level 3the definition of 'style-src' in that specification.
CSP: trusted-types - HTTP
this allows authors to define rules guarding writing values to the dom and thus reducing the dom xss attack surface to small, isolated parts of the web application codebase, facilitating their monitoring and code review.
Public-Key-Pins-Report-Only - HTTP
includesubdomains optional if this optional parameter is specified, this rule applies to all of the site's subdomains as well.
Public-Key-Pins - HTTP
includesubdomains optional if this optional parameter is specified, this rule applies to all of the site's subdomains as well.
Strict-Transport-Security - HTTP
includesubdomains optional if this optional parameter is specified, this rule applies to all of the site's subdomains as well.
HTTP headers - HTTP
WebHTTPHeaders
the standard establishes rules for upgrading or changing to a different protocol on the current client, server, transport protocol connection.
HTTP Index - HTTP
WebHTTPIndex
this allows authors to define rules guarding writing values to the dom and thus reducing the dom xss attack surface to small, isolated parts of the web application codebase, facilitating their monitoring and code review.
HTTP Public Key Pinning (HPKP) - HTTP
includesubdomains optional if this optional parameter is specified, this rule applies to all of the site's subdomains as well.
CSS Houdini
every element and style sheet rule has a style map which is accessible via its stylepropertymap.
A re-introduction to JavaScript (JS tutorial) - JavaScript
javascript has a boolean type, with possible values true and false (both of which are keywords.) any value can be converted to a boolean according to the following rules: false, 0, empty strings (""), nan, null, and undefined all become false.
Functions - JavaScript
note: coercion inside the isnan function has interesting rules; you may alternatively want to use number.isnan(), as defined in ecmascript 2015, or you can use typeof to determine if the value is not-a-number.
Using Promises - JavaScript
a good rule-of-thumb is to always either return or terminate promise chains, and as soon as you get a new promise, return it immediately, to flatten things: dosomething() .then(function(result) { return dosomethingelse(result); }) .then(newresult => dothirdthing(newresult)) .then(() => dofourththing()) .catch(error => console.error(error)); note that () => x is short for () => { return x; }.
Inheritance and the prototype chain - JavaScript
the only exception to the getting and setting behavior rules is when there is an inherited property with a getter or a setter.
SyntaxError: identifier starts immediately after numeric literal - JavaScript
the names of variables, called identifiers, conform to certain rules, which your code must adhere to!
Functions - JavaScript
each must be a string that conforms to the rules for a valid javascript identifier or a list of such strings separated with a comma; for example "x", "thevalue", or "a,b".
Array.prototype.every() - JavaScript
the this value ultimately observable by callback is determined according to the usual rules for determining the this seen by a function.
Array.prototype.filter() - JavaScript
the this value ultimately observable by callback is determined according to the usual rules for determining the this seen by a function.
Array.prototype.forEach() - JavaScript
the thisarg value ultimately observable by callback is determined according to the usual rules for determining the this seen by a function.
Array.prototype.map() - JavaScript
the this value ultimately observable by callback is determined according to the usual rules for determining the this seen by a function.
Array.prototype.some() - JavaScript
the this value ultimately observable by callback is determined according to the usual rules for determining the this seen by a function.
Intl.Locale.prototype.calendar - JavaScript
l-qura islamic-tbla islamic calendar, tabular (intercalary years [2,5,7,10,13,16,18,21,24,26,29] - astronomical epoch) islamic-civil islamic calendar, tabular (intercalary years [2,5,7,10,13,16,18,21,24,26,29] - civil epoch) islamic-rgsa islamic calendar, saudi arabia sighting iso8601 iso calendar (gregorian calendar using the iso 8601 calendar week rules) japanese japanese imperial calendar persian persian calendar roc republic of china calendar the islamicc calendar key has been deprecated.
Intl.Locale.prototype.numeric - JavaScript
description like intl.locale.casefirst, numeric represents a modification to the collation rules utilized by the locale.
Intl.Locale.prototype.script - JavaScript
there are exceptions to this rule, however, and it is important to indicate the script whenever possible, in order to have a complete unicode language identifier.
Intl - JavaScript
intl.pluralrules() constructor for objects that enable plural-sensitive formatting and language-specific rules for plurals.
Map.prototype.forEach() - JavaScript
the this value ultimately observable by callback is determined according to the usual rules for determining the this seen by a function.
Promise.prototype.then() - JavaScript
the behavior of the handler function follows a specific set of rules.
RegExpInstance.lastIndex - JavaScript
the following rules apply: if lastindex is greater than the length of the string, test() and exec() fail, then lastindex is set to 0.
RegExp - JavaScript
when using the constructor function, the normal string escape rules (preceding special characters with \ when included in a string) are necessary.
Set.prototype.forEach() - JavaScript
the this value ultimately observable by callback is determined according to the usual rules for determining the this seen by a function.
TypedArray.prototype.every() - JavaScript
the this value ultimately observable by callback is determined according to the usual rules for determining the this seen by a function.
TypedArray.prototype.filter() - JavaScript
the this value ultimately observable by callback is determined according to the usual rules for determining the this seen by a function.
TypedArray.prototype.forEach() - JavaScript
the this value ultimately observable by callback is determined according to the usual rules for determining the this seen by a function.
TypedArray.prototype.map() - JavaScript
the this value ultimately observable by mapfn is determined according to the usual rules for determining the this seen by a function.
TypedArray.prototype.some() - JavaScript
the this value ultimately observable by callback is determined according to the usual rules for determining the this seen by a function.
eval() - JavaScript
pass data instead of code for example, an extension designed to scrape contents of web-pages could have the scraping rules defined in xpath instead of javascript code.
isNaN() - JavaScript
note, coercion inside the isnan function has interesting rules; you may alternatively want to use number.isnan(), as defined in ecmascript 2015.
Standard built-in objects - JavaScript
intl intl.collator intl.datetimeformat intl.listformat intl.numberformat intl.pluralrules intl.relativetimeformat intl.locale webassembly webassembly webassembly.module webassembly.instance webassembly.memory webassembly.table webassembly.compileerror webassembly.linkerror webassembly.runtimeerror other arguments ...
Logical AND assignment (&&=) - JavaScript
syntax expr1 &&= expr2 description short-circuit evaluation the logical and operator is evaluated left to right, it is tested for possible short-circuit evaluation using the following rule: (some falsy expression) && expr is short-circuit evaluated to the falsy expression; short circuit means that the expr part above is not evaluated, hence any side effects of doing so do not take effect (e.g., if expr is a function call, the calling never takes place).
Logical nullish assignment (??=) - JavaScript
syntax expr1 ??= expr2 description short-circuit evaluation the nullish coalescing operator is evaluated left to right, it is tested for possible short-circuit evaluation using the following rule: (some expression that is neither null nor undefined) ??
let - JavaScript
examples scoping rules variables declared by let have their scope in the block for which they are defined, as well as in any contained sub-blocks.
Template literals (Template strings) - JavaScript
let str = string.raw`hi\n${2+3}!`; // "hi\n5!" str.length; // 6 array.from(str).join(','); // "h,i,\,n,5,!" tagged templates and escape sequences es2016 behavior as of ecmascript 2016, tagged templates conform to the rules of the following escape sequences: unicode escapes started by "\u", for example \u00a9 unicode code point escapes indicated by "\u{}", for example \u{2f804} hexadecimal escapes started by "\x", for example \xa9 octal literal escapes started by "\0o" and followed by one or more digits, for example \0o251 this means that a tagged template like the following is problematic, because, per ecm...
JavaScript reference - JavaScript
map set weakmap weakset structured data arraybuffer sharedarraybuffer atomics dataview json control abstraction promise generator generatorfunction asyncfunction reflection reflect proxy internationalization intl intl.collator intl.datetimeformat intl.displaynames intl.listformat intl.locale intl.numberformat intl.pluralrules intl.relativetimeformat webassembly webassembly webassembly.module webassembly.instance webassembly.memory webassembly.table webassembly.compileerror webassembly.linkerror webassembly.runtimeerror statements javascript statements and declarations control flowblock break continue empty if...else switch throw try...catch declarations var ...
<semantics> - MathML
the rules of determining the visible child in a <semantics> element are the following: if no rule other rule applies: by default only the first child is rendered, which is supposed to be presentation markup.
Web audio codec guide - Web media technologies
for each factor that affects the encoded audio, there is a simple rule that is nearly always true: because the fidelity of digital audio is determined by the granularity and precision of the samples taken to convert it into a data stream, the more data used to represent the digital version of the audio, the more closely the sampled sound will match the source material.
Web video codec guide - Web media technologies
some details may be lost; the amount of loss depends on the codec and how it's configured, but as a general rule, the more compression you achieve, the more loss of detail and fidelity will occur.
Performance fundamentals - Web Performance
fully static content is the exception rather than the rule for rich applications.
Performance budgets - Web Performance
rule-based (e.g.
Web Performance
to understand how to improve performance and perceived performance, it helps to understand how the browser works.recommended web performance timings: how long is too long?there are no clear set rules as to what constitutes a slow pace when loading pages, but there are specific guidelines for indicating content will load (1 second), idling (50ms), animating (16.7s) and responding to user input (50 to 200ms).the business case for web performanceyou know web performance is important, but how do you convince clients and management to invest in performance and make it a priority.
Introduction to progressive web apps - Progressive web apps (PWAs)
above all you should follow the progressive enhancement rule: use technologies that enhance the appearance and utility of your app when they're available, but still offer the basic functionality of your app when those features are unavailable.
Progressive loading - Progressive web apps (PWAs)
in our js13kpwa demo app, the css is simple enough to leave it all in a single file with no specific rules as to how to load them.
Graphic design for responsive sites - Progressive web apps (PWAs)
css media queries allow us to serve different css rules dependant on viewport dimensions, and you should consider using mobile first media queries where possible.
Mobile first - Progressive web apps (PWAs)
when they are not supported, the <html> tag looks like this: <html class=" js no-rgba no-multiplebgs"> when these are present, we can serve alternative styling rules to provide sensible fallbacks using descendant selectors — see the following in my code.
cap-height - SVG: Scalable Vector Graphics
note: it was specified to share the syntax and semantics of the obsolete cap-height descriptor of the @font-face at-rule defined in an early version of css 2.
data-* - SVG: Scalable Vector Graphics
WebSVGAttributedata-*
the * can be replaced by any characters allowed in xml's rules for names, with the following restrictions: can't start with xml.
descent - SVG: Scalable Vector Graphics
WebSVGAttributedescent
note: it was specified to share the syntax and semantics of the obsolete descent descriptor of the @font-face at-rule defined in an early version of css 2.
glyph-orientation-vertical - SVG: Scalable Vector Graphics
this reorientation rule applies only to the first-level non-ideographic text.
href - SVG: Scalable Vector Graphics
WebSVGAttributehref
except for any svg-specific rules explicitly mentioned in this specification, the normative definition for this attribute is the smil animation specification.
in - SVG: Scalable Vector Graphics
WebSVGAttributein
sourcealpha has all of the same rules as sourcegraphic except that only the alpha channel is used.
name - SVG: Scalable Vector Graphics
WebSVGAttributename
unlike the syntax allowed between the parentheses of the local(…) clause in an @font-face rule src descriptor, the font name specified in this attribute is not surrounded in single or double quotes.
spacing - SVG: Scalable Vector Graphics
WebSVGAttributespacing
exact this value indicates that the typographic characters should be rendered exactly according to the spacing rules as specified by the layout rules for text-on-a-path.
string - SVG: Scalable Vector Graphics
WebSVGAttributestring
see the src descriptor of the @font-face at-rule for more information.
<altGlyph> - SVG: Scalable Vector Graphics
WebSVGElementaltGlyph
value type: <iri> ; default value: none; animatable: no global attributes core attributes most notably: id lang styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, document element event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility xlink attributes xlink:href, xlink:type, xlink:role...
<circle> - SVG: Scalable Vector Graphics
WebSVGElementcircle
global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, a...
<clipPath> - SVG: Scalable Vector Graphics
WebSVGElementclipPath
value type: userspaceonuse|objectboundingbox ; default value: userspaceonuse; animatable: yes global attributes core attributes most notably: id styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, display, fill, fill-opacity, fill-rule, filter, mask, opacity, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriesnonepermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elemen...
<defs> - SVG: Scalable Vector Graphics
WebSVGElementdefs
</defs> <!-- using my graphical objects --> <use x="5" y="5" xlink:href="#mycircle" fill="url('#mygradient')" /> </svg> attributes global attributes core attributes most notably: id lang styling attributes class, style event attributes global event attributes, document element event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriescontainer element, structural elementpermitted contentany nu...
<ellipse> - SVG: Scalable Vector Graphics
WebSVGElementellipse
global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, a...
<feBlend> - SVG: Scalable Vector Graphics
WebSVGElementfeBlend
the <feblend> svg filter primitive composes two objects together ruled by a certain blending mode.
<font-face-src> - SVG: Scalable Vector Graphics
the <font-face-src> svg element corresponds to the src descriptor in css @font-face rules.
<font-face> - SVG: Scalable Vector Graphics
WebSVGElementfont-face
the <font-face> svg element corresponds to the css @font-face rule.
<foreignObject> - SVG: Scalable Vector Graphics
global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes, document event attributes, document element event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, a...
<g> - SVG: Scalable Vector Graphics
WebSVGElementg
0" r="25" /> </g> </svg> attributes this element only includes global attributes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, a...
<line> - SVG: Scalable Vector Graphics
WebSVGElementline
value type: <number> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, a...
<linearGradient> - SVG: Scalable Vector Graphics
value type: <length> ; default value: 0%; animatable: yes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes xlink:href, xlink:title usage notes categoriesgradient elementp...
<marker> - SVG: Scalable Vector Graphics
WebSVGElementmarker
value type: <list-of-numbers> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, a...
<mask> - SVG: Scalable Vector Graphics
WebSVGElementmask
value type: <length> ; default value: 120%; animatable: yes global attributes core attributes most notably: id styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, display, fill, fill-opacity, fill-rule, filter, mask, opacity, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive element...
<path> - SVG: Scalable Vector Graphics
WebSVGElementpath
value type: <number> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, a...
<pattern> - SVG: Scalable Vector Graphics
WebSVGElementpattern
value type: <length>|<percentage> ; default value: 0; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes most notably: xlink:title usage notes categoriescontainer eleme...
<polygon> - SVG: Scalable Vector Graphics
WebSVGElementpolygon
value type: <number> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, a...
<polyline> - SVG: Scalable Vector Graphics
WebSVGElementpolyline
value type: <number> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, a...
<radialGradient> - SVG: Scalable Vector Graphics
value type: <iri> ; default value: none; animatable: yes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility xlink attributes xlink:href, xlink:title usage notes categoriesgradient elementp...
<rect> - SVG: Scalable Vector Graphics
WebSVGElementrect
global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, a...
<svg> - SVG: Scalable Vector Graphics
WebSVGElementsvg
global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes, document event attributes, document element event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, a...
<symbol> - SVG: Scalable Vector Graphics
WebSVGElementsymbol
value type: <length>|<percentage> ; default value: 0; animatable: yes global attributes core attributes most notably: id styling attributes class, style event attributes global event attributes, document element event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, a...
<text> - SVG: Scalable Vector Graphics
WebSVGElementtext
attributes core attributes most notably: id, tabindex styling attributes class, style, font-family, font-size, font-size-adjust, font-stretch, font-style, font-variant, font-weight conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic,...
<textPath> - SVG: Scalable Vector Graphics
WebSVGElementtextPath
value type: <length>|<percentage>|<number> ; default value: auto; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, a...
<tspan> - SVG: Scalable Vector Graphics
WebSVGElementtspan
value type: <length>|<percentage> ; default value: none; animatable: yes global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, dominant-baseline, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, text-anchor, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic,...
<use> - SVG: Scalable Vector Graphics
WebSVGElementuse
global attributes core attributes most notably: id, tabindex styling attributes class, style conditional processing attributes most notably: requiredextensions, systemlanguage event attributes global event attributes, graphical event attributes presentation attributes most notably: clip-path, clip-rule, color, color-interpolation, color-rendering, cursor, display, fill, fill-opacity, fill-rule, filter, mask, opacity, pointer-events, shape-rendering, stroke, stroke-dasharray, stroke-dashoffset, stroke-linecap, stroke-linejoin, stroke-miterlimit, stroke-opacity, stroke-width, transform, vector-effect, visibility aria attributes aria-activedescendant, aria-atomic, aria-autocomplete, aria-busy, a...
SVG 1.1 Support in Firefox - SVG: Scalable Vector Graphics
doesn't completely follow <svg:use> cascading rules (bug 265894).
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
implementation status unknown svg and html style sheets in html document with inline svg applying to whole document content implementation status unknown presentation attributes on any svg namespaced element implementation status unknown display behavior of <style> defined via ua style sheet implementation status unknown !important user agent style rules controlling never-rendered elements implementation status unknown :focus and ::selection styles implementation status unknown geometry change notes x and y attributes removed from <pattern> and <filter> implementation status unknown auto value of width and height computes to 0 but 100% on <svg> not implemented coordinate syste...
Getting started - SVG: Scalable Vector Graphics
the globally valid rule for svg files is, that later elements are rendered atop previous elements.
SVG and CSS - SVG: Scalable Vector Graphics
there is some discussion about what rules apply to such referenced elements.
Same-origin policy - Web security
due to the relaxed syntax rules of css, cross-origin css requires a correct content-type header.
unparsed-entity-url - XPath
if the argument is not a string, it is converted using the rules of the string() function.
<xsl:if> - XSLT: Extensible Stylesheet Language Transformations
WebXSLTElementif
syntax <xsl:if test=expression> template </xsl:if> required attributes test contains an xpath expression that can be evaluated (using the rules defined for boolean( ) if necessary) to a boolean value.
PI Parameters - XSLT: Extensible Stylesheet Language Transformations
processing instructions the attributes in the xslt-param and xslt-param-namespace pis are parsed using the rules defined in xml-stylesheet.
Compiling a New C/C++ Module to WebAssembly - WebAssembly
due to c versus c++ name mangling rules, this would otherwise break, but here we are setting it so that it treats it as an external c function if you are using c++.
Understanding WebAssembly text format - WebAssembly
the webassembly validation rules ensure the stack matches exactly: if you declare a (result f32), then the stack must contain exactly one f32 at the end.