Search completed in 1.16 seconds.
Box alignment in Flexbox - CSS: Cascading Style Sheets
the
box alignment specification details how alignment works in various layout methods; on this page, we explore how
box alignment works in the context of flex
box.
... as this page aims to detail things which are specific to flex
box and
box alignment, it should be read in conjunction with the main
box alignment page which details the common features of
box alignment across layout methods.
... the axes and flex-direction flex
box respects the writing mode of the document, therefore if you are working in english and set justify-content to flex-end this will align the items to the end of the flex container.
...And 7 more matches
CSS Flexbox Inspector: Examine Flexbox layouts - Firefox Developer Tools
the flex
box inspector allows you to examine css flex
box layouts using the firefox devtools, which is useful for discovering flex containers on a page, examining and modifying them, debugging layout issues, and more.
... discovering flex containers when an html element on your page has display: flex applied to it, a number of features are made available in the devtools to provide easy access to flex
box layout features.
... in the html pane in the html pane, an element laid out with flex
box has the word flex next to it as shown in the following image: click the word flex in the html pane to keep the overlay visible when you move the mouse away from the container.
...And 3 more matches
The box model - Learn web development
previous overview: building blocks next everything in css has a
box around it, and understanding these
boxes is key to being able to create layouts with css, or to align items with other items.
... in this lesson, we will take a proper look at the css
box model so that you can build more complex layout tasks with an understanding of how it works and the terminology that relates to it.
... prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn about the css
box model, what makes up the
box model and how to switch to the alternate model.
...And 72 more matches
textbox - Archive of obsolete content
clickselectsall, decimalplaces, decimalsymbol, defaultvalue, disabled, editor, emptytext, increment, inputfield, label, max, maxlength, min, placeholder, readonly, searchbutton, selectionend, selectionstart, size, spinbuttons, tabindex, textlength, timeout, type, value, valuenumber, wraparound methods decrease, increase, reset, select, setselectionrange style classes plain examples <v
box> <label control="your-name" value="enter your name:"/> <text
box id="your-name" value="john"/> </v
box> attributes cols type: integer for multiline text
boxes, the number of columns to display.
... emptytext deprecated since gecko 2 type: string a string that appears in the text
box when it has no value.
... hidespinbuttons type: boolean if true, the number
box does not have arrow buttons next to it to allow the user to adjust the value.
...And 59 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element is created by setting the type attribute of a text
box to autocomplete.
... it is used to create a text
box with a popup containing a list of possible completions for what the user has started to type.
... the autocomplete functionality is handled through one of more session objects, each of which can return a set of results given the current value of the text
box.
...And 48 more matches
<input type="checkbox"> - HTML: Hypertext Markup Language
<input> elements of type check
box are rendered by default as
boxes that are checked (ticked) when activated, like you might see in an official government paper form.
...a check
box allows you to select single values for submission in a form (or not).
... note: radio buttons are similar to check
boxes, but with an important distinction — radio buttons are grouped into a set in which only one radio button can be selected at a time, whereas check
boxes allow you to turn single values on and off.
...And 42 more matches
The Box Model - Archive of obsolete content
introduction to
boxes the main form of layout in xul is called the '
box model'.
... this model allows you to divide a window into a series of
boxes.
... elements inside of a
box will orient themselves horizontally or vertically.
...And 37 more matches
ARIA: listbox role - Accessibility
the list
box role is used for lists from which a user may select one or more items which are static and, unlike html <select> elements, may contain images.
... description the list
box role is used to identify an element that creates a list from which a user may select one or more static items, similar to the html <select> element.
... unlike <select>, a list
box can contain images.
...And 37 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element is created by setting the type attribute of the text
box to autocomplete.
... it is used to create a text
box with a popup containing a list of possible completions for what the user has started to type.
...the example below will create an autocomplete text
box that will search the user's history.
...And 36 more matches
Box Objects - Archive of obsolete content
« previousnext » this section describes the
box object, which holds display and layout related information about a xul
box as well as some details about xul layout.
...unless you change the style for an element, most xul elements will usually use the
box layout object or one of its subtypes.
... recall that all xul elements are types of
boxes, that is the
box is the base of all displayed xul elements.
...And 36 more matches
Components.utils.Sandbox
components.utils.sand
box is used to create a sand
box object for use with evalinsand
box().
... creating a sand
box to create a new sand
box, call components.utils.sand
box: var sand
box = components.utils.sand
box(principal[, options]); using new components.utils.sand
box(...) to create a sand
box has the same effect as calling sand
box(...) without new.
... the created sand
box is simply an empty javascript object marked as having been created by the restricted privilege principal.
...And 33 more matches
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
in this article we will take a look at how flex
box fits in with all the other css modules.
... we’ll find out which specifications you also need to take notice of if you want to learn flex
box, and find out why flex
box is different to some other modules.
... the
box alignment module for many people the first reason they start to look at flex
box is because of the ability to properly align flex items inside a flex container.
...And 31 more matches
The Box Model - Archive of obsolete content
« previousnext » in order to master xul, you'll need to have a fairly good understanding of its
box model.
... the xul
box model is a significant improvement over the html layout model, which is mostly vertical.
... any xul interface can be broken down into the following basic components:
boxes text images alignment and flexibility widths and heights margins and paddings menus, toolbar buttons, and even the most complex elements in xul are composed of these simple ingredients.
...And 25 more matches
Box Model Details - Archive of obsolete content
« previousnext » we've seen a lot of features of the
box model.
...we've added them to buttons and text
boxes, but we can also add them to spacers or
boxes.
...example 1 : source view <h
box flex="1"> <button label="left" style="min-width: 100px;" flex="1"/> <spacer flex="1"/> <button label="right" style="min-width: 100px;" flex="1"/> </h
box> in the example above, all three elements will resize themselves as they are all flexible.
...And 25 more matches
Flexbox - Learn web development
previous overview: css layout next flex
box is a one-dimensional layout method for laying out items in rows or columns.
... prerequisites: html basics (study introduction to html), and an idea of how css works (study introduction to css.) objective: to learn how to use the flex
box layout system to create web layouts.
... why flex
box?
...And 25 more matches
Introduction to the CSS basic box model - CSS: Cascading Style Sheets
when laying out a document, the browser's rendering engine represents each element as a rectangular
box according to the standard css basic
box model.
... css determines the size, position, and properties (color, background, border size, etc.) of these
boxes.
... every
box is composed of four parts (or areas), defined by their respective edges: the content edge, padding edge, border edge, and margin edge.
...And 8 more matches
box-decoration-break - CSS: Cascading Style Sheets
the
box-decoration-break css property specifies how an element's fragments should be rendered when broken across multiple lines, columns, or pages.
... the specified value will impact the appearance of the following properties: background border border-image
box-shadow clip-path margin padding syntax /* keyword values */
box-decoration-break: slice;
box-decoration-break: clone; /* global values */
box-decoration-break: initial;
box-decoration-break: inherit;
box-decoration-break: unset; the
box-decoration-break property is specified as one of the keyword values listed below.
... values slice the element is initially rendered as if its
box were not fragmented, after which the rendering for this hypothetical
box is sliced into pieces for each line/column/page.
...And 8 more matches
box-direction - CSS: Cascading Style Sheets
this is a property of the original css flexible
box layout module draft, and has been replaced by a newer standard.
... the -moz-
box-direction will only be used for xul while the previous standard
box-direction has been replaced by flex-direction.
... see flex
box for information about the current standard.
...And 8 more matches
box-orient - CSS: Cascading Style Sheets
this is a property of the original css flexible
box layout module draft, and has been replaced by a newer standard.
... see flex
box for information about the current standard.
... the
box-orient css property sets whether an element lays out its contents horizontally or vertically.
...And 8 more matches
viewBox - SVG: Scalable Vector Graphics
the view
box attribute defines the position and dimension, in user space, of an svg viewport.
... the value of the view
box attribute is a list of four numbers: min-x, min-y, width and height.
... html,body,svg { height:100% } svg:not(:root) { display: inline-block; } <svg view
box="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- with relative unit such as percentage, the visual size of the square looks unchanged regardless of the view
box --> <rect x="0" y="0" width="100%" height="100%"/> <!-- with a large view
box the circle looks small as it is using user units for the r attribute: 4 resolved against 100 as set in the view
box --> <circle cx="50%" cy="50%" r="4" fill="white"/> </svg> <svg view
box="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> ...
...And 8 more matches
tabbox - Archive of obsolete content
a row of tabs is displayed at the top of tab
box which may be used to switch between each page.
... the tab
box should contain two children, the first a tabs element which contains the tabs and the second a tabpanels element which contains the contents of the pages.
... attributes eventnode, handlectrlpageupdown, handlectrltab properties accessibletype, eventnode, handlectrlpageupdown, handlectrltab, selectedindex, selectedpanel, selectedtab, tabs, tabpanels examples <tab
box id="mytablist" selectedindex="2"> <tabs> <tab label="a first tab"/> <tab label="second tab"/> <tab label="another tab"/> <tab label="last tab"/> </tabs> <tabpanels> <tabpanel><!-- tabpanel first elements go here --></tabpanel> <tabpanel><!-- tabpanel second elements go here --></tabpanel> <tabpanel><button label="click me"/></tabpanel> <tabpanel><!-- tabpanel fourth elements go here --></tabpanel> </tabpanels> </tab
box> attributes eventnode type: one of the values below i...
...And 7 more matches
ResizeObserverEntry.contentBoxSize - Web APIs
the content
boxsize read-only property of the resizeobserverentry interface returns an array containing the new content
box size of the observed element when the callback is run.
... syntax var mycontent
boxsize = resizeobserverentry.content
boxsize; value an object containing the new content
box size of the observed element.
... this object contains two properties: blocksize the length of the observed element's content
box in the block dimension.
...And 7 more matches
-webkit-mask-box-image - CSS: Cascading Style Sheets
-webkit-mask-
box-image sets the mask image for an element's border
box.
... initial value: none applies to: all elements inherited: no media: visual computed value: as specified syntax -webkit-mask-
box-image: <mask-
box-image> [<top> <right> <bottom> <left> <x-repeat> <y-repeat>] where: <mask-
box-image> <uri> | <gradient> | none <top> <right> <bottom> <left> <length> | <percentage> <x-repeat> <y-repeat> repeat | stretch | round | space values <uri> the location of the image resource to be used as a mask image.
... none used to specify that a border
box is to have no mask image.
...And 7 more matches
Enabling the behavior - retrieving tinderbox status - Archive of obsolete content
to make it work we have to add javascript code that changes its status when the tinder
box status changes.
... the first step is to write a function that queries the tinder
box server and retrieves the current status.
... var gxmlhttprequest; function loadtinder
boxstatus() { gxmlhttprequest = new xmlhttprequest(); gxmlhttprequest.onload = updatetinder
boxstatus; gxmlhttprequest.open("get", "http://tinder
box.mozilla.org/seamonkey/panel.html"); gxmlhttprequest.send(null); } xmlhttprequest is an interface in mozilla for retrieving documents via http.
...And 6 more matches
A cool-looking box - Learn web development
in this assessment, you'll get some more practice in creating cool-looking
boxes by trying to create an eye-catching
box.
... objective: to test comprehension of the css
box model and other
box-related features such as borders and backgrounds.
... project brief your task is to create a cool, fancy
box and explore the fun we can have with css.
...And 6 more matches
Components.utils.evalInSandbox
the evalinsand
box() function enables you to evaluate javascript code inside a sand
box you've previously created using the components.utils.sand
box constructor.
... note: it's not safe to use evalinsand
box() to evaluate json strings; instead, use the techniques discussed in the article on json.
... use to use evalinsand
box(), you must first create a sand
box object using its constructor, components.utils.sand
box.
...And 6 more matches
box-flex-group - CSS: Cascading Style Sheets
this is a property of the original css flexible
box layout module draft, and has been replaced by a newer standard.
... see flex
box for information about the current standard.
... the
box-flex-group css property assigns the flex
box's child elements to a flex group.
...And 6 more matches
checkbox - Archive of obsolete content
this is most commonly rendered as a
box when the element is off and a
box with a check when the element is on.
... the user can switch the state of the check
box by selecting it with the mouse.
... a label, specified with the label attribute, may be added beside the check
box.
...And 5 more matches
notificationbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] the notification
box element is used to display notifications above an element.
... the notification
box is a vertical
box which may have children.
... the notifications appear at the top of the
box.
...And 5 more matches
Toolbox - Firefox Developer Tools
the tool
box provides a single home for most of the developer tools that are built into firefox.
... there are a few different ways to open the tool
box: select "toggle tools" from the web developer menu (under "tools" on os x and linux, or "firefox" on windows) click the wrench icon (), which is in the main toolbar or under the hamburger menu (), then select "toggle tools" activate any tool hosted in the tool
box (for example, the javascript debugger or the page inspector) press ctrl + shift + i on windows and linux, or cmd + opt + i on os x.
...this is what it looks like when it's docked: the window itself is split into two parts: a toolbar along the top, and a main pane underneath: note: since firefox 62, you can drag and drop tabs in the main toolbar of the tool
box to reorder your tools as you wish (bug 1226272).
...And 5 more matches
overflow-clip-box-block
the overflow-clip-
box-block css property specifies relative to which
box the clipping happens when there is an overflow — in the block direction.
... /* keyword values */ overflow-clip-
box-block: padding-
box; overflow-clip-
box-block: content-
box; /* global values */ overflow-clip-
box-block: inherited; overflow-clip-
box-block: initial; overflow-clip-
box-block: unset; note: on gecko, by default, padding-
box is used everywhere, but <input type="text"> and similar use the value content-
box.
... syntax values padding-
box this keyword makes the clipping be related to the padding
box.
...And 2 more matches
overflow-clip-box-inline
the overflow-clip-
box-inline css property specifies relative to which
box the clipping happens when there is an overflow — in the inline direction.
... /* keyword values */ overflow-clip-
box-inline: padding-
box; overflow-clip-
box-inline: content-
box; /* global values */ overflow-clip-
box-inline: inherited; overflow-clip-
box-inline: initial; overflow-clip-
box-inline: unset; note: on gecko, by default, padding-
box is used everywhere, but <input type="text"> and similar use the value content-
box.
... syntax values padding-
box this keyword makes the clipping be related to the padding
box.
...And 2 more matches
nsIMenuBoxObject
layout/xul/base/public/nsimenu
boxobject.idlscriptable represents the
box object for a xul menu.
... inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) to get access to the
box object for a given menu, use code like this: var
boxobject = xulmenu.
boxobject.queryinterface(components.interfaces.nsimenu
boxobject); method overview boolean handlekeypress(in nsidomkeyevent keyevent); void openmenu(in boolean openflag); attributes attribute type description activechild nsidomelement the currently active menu or menuitem child of the menu
box.
... note: for gecko 2.0, the openedwithkey attribute exists on the nsimenu
boxobject_mozilla_2_0_branch interface.
...And 2 more matches
SVGFitToViewBox - Web APIs
svg fit to view
box interface the svgfittoview
box interface is used to reflect the view
box and preserveaspectratio attributes, and is mixed in to other interfaces for elements that support these two attributes.
... interface overview also implement none methods none properties svganimatedpreserveaspectratio preserveaspectratio svganimatedrect view
box normative document svg 1.1 (2nd edition) properties name type description preserveaspectratio svganimatedpreserveaspectratio corresponds to attribute preserveaspectratio on the given element.
... view
box svganimatedrect corresponds to attribute view
box on the given element.
...And 2 more matches
getBBox() - Web APIs
the svggraphicselement.getb
box() allows us to determine the coordinates of the smallest rectangle in which the object fits.
... note: getb
box() must return the actual bounding
box at the time the method was called—even in case the element has not yet been rendered.
... getb
box returns different values than getboundingclientrect(), as the latter returns value relative to the viewport syntax let b
boxrect = object.getb
box(); return value the returned value is a svgrect object, which defines the bounding
box.
...And 2 more matches
Boxes - Archive of obsolete content
this does not happen with xul
box (or h
box and v
box) by default.
...make the
box style="display: block" and the wrapping behavior will occur when the
box is resized: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <h
box style="display: block"> <label value="aaa"/> <label value="bbb"/> <label value="ccc"/> <label value="ddd"/> <label value="eee"/> <label value="fff"/> <label value="ggg"/> <label value="hhh"/> <label value="iii"/> <label value="jjj"/> <label value="kkk"/> <label value="lll"/> <label value="mmm"/> <label value="nnn"/> <label value="ooo"/> <label value="ppp"/> <label value="qqq"/> <label value="rrr"/> <label val...
...ue="sss"/> <label value="ttt"/> <label value="uuu"/> <label value="vvv"/> <label value="www"/> <label value="xxx"/> <label value="yyy"/> <label value="zzz"/> </h
box> </window> images if you put image in the contents, you should probably add align="start" attribute to the
box.
... this keeps the image from stretching inside the
box: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <
box align="start" style="display:block"> <image src="chrome://global/skin/icons/error.png" style="padding:5px"/> <text
box /> <image src="chrome://global/skin/icons/error.png" style="padding:5px"/> <button label="hello"/> <image src="chrome://global/skin/icons/error.png" style="padding:5px"/> </
box> </window> ...
textbox.onblur - Archive of obsolete content
« xul reference home onblur type: script code this event is sent when a text
box loses keyboard focus.
...prior to gecko 1.9 (firefox 3), the script code would execute in the context of the anonymous html <input> element inside the text
box binding.
... from gecko 1.9 to gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9), the script code would actually execute twice, once in the context of the anonymous html <input> element and once in the context of the <text
box> element itself.
... as of gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10), the script code only runs in the context of the <text
box> element, matching the behavior of all other event handlers.
textbox.onfocus - Archive of obsolete content
« xul reference home onfocus type: script code this event is sent when a text
box receives keyboard focus.
...prior to gecko 1.9 (firefox 3), the script code would execute in the context of the anonymous html <input> element inside the text
box binding.
... from gecko 1.9 to gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9), the script code would actually execute twice, once in the context of the anonymous html <input> element and once in the context of the <text
box> element itself.
... as of gecko 13.0 (firefox 13.0 / thunderbird 13.0 / seamonkey 2.10), the script code only runs in the context of the <text
box> element, matching the behavior of all other event handlers.
box - Archive of obsolete content
if the
box has an orient attribute that is set to horizontal, the child elements are laid out from left to right in the order that they appear in the
box.
... examples <
box orient="horizontal"> <label value="zero"/> <
box orient="vertical"> <label value="one"/> <label value="two"/> </
box> <
box orient="horizontal"> <label value="three"/> <label value="four"/> </
box> </
box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, or...
...dinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(...
...es(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements v
box, h
box ...
hbox - Archive of obsolete content
this is equivalent to the
box element, except it defaults to horizontal orientation.
... example <!-- two button on the right --> <h
box> <spacer flex="1"/> <button label="connect"/> <button label="ping"/> </h
box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties...
... align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattri...
...des(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements
box, v
box ...
vbox - Archive of obsolete content
this is equivalent to the
box element, except it defaults to vertical orientation.
... example <!-- two labels at bottom --> <v
box> <spacer flex="1"/> <label value="one"/> <label value="two"/> </v
box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align,...
... , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfeature, getuserdata, hasattribute(), ...
...des(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements
box, h
box ...
Test your skills: Flexbox - Learn web development
the aim of this task is to get you working with flex
box and demonstrate your understanding of how flex items behave.
... below are four common design patterns which you might use flex
box to create, your task is to build them.
...use flex
box to center the child inside the parent.
...your post should include: a descriptive title such as "assessment wanted for flex
box layout 1 skill test".
toolboxid - Archive of obsolete content
« xul reference tool
boxid type: string the id of the tool
box this toolbar is a member of.
... this will either be the tool
box's parent (if it's in a tool
box), or, if the toolbar is an external toolbar (that is, one not contained in a tool
box), the id of the tool
box it should be considered to be part of.
... this makes it possible to have toolbars that are not contained within tool
boxes, such as the add-on bar.
treeBoxObject - Archive of obsolete content
« xul reference tree
boxobject type: nsitree
boxobject the
box object is responsible for rendering the tree on the window.
... this object implements the nsitree
boxobject interface and contains functions for retrieving the cells at certain coordinates, redrawing cells and scrolling the tree.
... this property is equivalent to the
boxobject property.
bbox - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a horizontal
box that is baseline aligned.
... it is equivalent to using an h
box element with an align attribute set to baseline.
..., insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
Bounding volume collision detection with THREE.js - Game development
this article shows how to implement collision detection between bounding
boxes and spheres using the three.js library.
... using
box3 and sphere three.js has objects that represent mathematical volumes and shapes — for 3d aabb and bounding spheres we can use the
box3 and sphere objects.
... instantiating
boxes to create a
box3 instance, we need to provide the lower and upper boundaries of the
box.
...And 33 more matches
display - CSS: Cascading Style Sheets
some values of display are fully defined in their own individual specifications; for example the detail of what happens when display: flex is declared is defined in the css flexible
box model specification.
...keyword values are grouped into six value categories: .container { display: [ <display-outside> || <display-inside> ] | <display-listitem> | <display-internal> | <display-
box> | <display-legacy> ; } outside <display-outside> these keywords specify the element’s outer display type, which is essentially its role in flow layout.
... valid <display-outside> values: block the element generates a block element
box, generating line breaks both before and after the element when in the normal flow.
...And 30 more matches
Index - Web APIs
returning domquads lets get
boxquads() return accurate information even when arbitrary 2d or 3d transforms are present.
...such a set is returned by element.classlist, htmllinkelement.rellist, htmlanchorelement.rellist, htmlareaelement.rellist, htmliframeelement.sand
box, or htmloutputelement.htmlfor.
... 918 document.get
boxobjectfor() api, dom, method, obsolete, reference returns a
boxobject (x, y, width, height) for a specified element.
...And 29 more matches
Block and inline layout in normal flow - CSS: Cascading Style Sheets
normal flow is defined in the css 2.1 specification, which explains that any
boxes in normal flow will be part of a formatting context.
...we describe block-level
boxes as participating in a block formatting context, and inline-level
boxes as participating in an inline formatting context.
...for elements with a block formatting context, the spec says: “in a block formatting context,
boxes are laid out one after the other, vertically, beginning at the top of a containing block.
...And 28 more matches
preserveAspectRatio - SVG: Scalable Vector Graphics
the preserveaspectratio attribute indicates how an element with a view
box providing a given aspect ratio must fit into a viewport with a different aspect ratio.
... because the aspect ratio of an svg image is defined by the view
box attribute, if this attribute isn't set, the preserveaspectratio attribute has no effect (with one exception, the <image> element, as described below).
... example <svg view
box="-1 -1 162 92" xmlns="http://www.w3.org/2000/svg"> <defs> <path id="smiley" d="m50,10 a40,40,1,1,1,50,90 a40,40,1,1,1,50,10 m30,40 q36,35,42,40 m58,40 q64,35,70,40 m30,60 q50,75,70,60 q50,75,30,60" /> </defs> <!-- (width>height) meet --> <svg preserveaspectratio="xmidymid meet" x="0" y="0" view
box="0 0 100 100" width="20" height="10"><use href="#smiley" /></svg> <svg preserveaspectratio="xminymid meet" x="25" y="0" view
box="0 0 100 100" width="20" height="10"><use href="#smiley" /></svg> <svg preserveaspectratio="xmaxymid meet" x="50" y="0" view
box="0 0 100 100" width="20" height="10"><use href="#smiley" /></svg> <!-- (width>height) slice --> <svg preserveaspectratio="xmidymin slice" x="0" y="15" view
box="0 0 100 100" width="20" h...
...And 28 more matches
Floats - Learn web development
with the advent of flex
box and grid it has now returned to its original purpose, as this article explains.
... first, we'll start off with some simple html — add the following to your html body, removing anything that was inside there before: <h1>simple float example</h1> <div class="
box">float</div> <p>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p> now apply the following css to your html (using a <style> element or a <link> to a separate .css file — your choice): body { width: 90%; max-width: 900px; margin: 0 auto; font: .9em/1.2 arial, helvetica, sans-serif } .
box { width: 150px; height: 100px; border-radius: 5px; background-color: rgb(207,232,220); padding: 1em; } if you save and refresh now, you'll see something much like what you'd expect — the
box is sitting above the text, in normal flow.
...And 26 more matches
clip-path - CSS: Cascading Style Sheets
syntax /* keyword values */ clip-path: none; /* <clip-source> values */ clip-path: url(resources.svg#c1); /* <geometry-
box> values */ clip-path: margin-
box; clip-path: border-
box; clip-path: padding-
box; clip-path: content-
box; clip-path: fill-
box; clip-path: stroke-
box; clip-path: view-
box; /* <basic-shape> values */ clip-path: inset(100px 50px); clip-path: circle(50px at 0 100px); clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%); clip-path: path('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'); /*
box and shape values combined */ clip-path: padding-
box circle(50px at 0 100px); /* global values */ clip-path: inherit; clip-path: initial; clip-path: unset; the clip-path property is specified as one or a combination of the values listed below.
... <basic-shape> a shape whose size and position is defined by the <geometry-
box> value.
...And 26 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
<input type="button" name="button" /> check
box a check
box allowing single values to be selected/deselected.
... <input type="check
box" name="check
box"/> color a control for specifying a color; opening a color picker when active in supporting browsers.
...required for accessibility autocomplete all hint for form autofill feature autofocus all automatically focus the form control when the page is loaded capture file media capture input method in file upload controls checked radio, check
box whether the command or control is checked dirname text, search name of form field to use for sending the element's directionality in form submission disabled all whether the form control is disabled form all associates the control with a form element formaction image, submit url to use for form submission formenctype image...
...And 25 more matches
Using CSS transitions - CSS: Cascading Style Sheets
transition-duration: 0.5s <div class="parent"> <div class="
box">lorem</div> </div> .parent { width: 250px; height:125px;} .
box { width: 100px; height: 100px; background-color: red; font-size: 20px; left: 0px; top: 0px; position:absolute; -webkit-transition-property: width height background-color font-size left top transform -webkit-transform color; -webkit-transition-duration: 0.5s; -webkit-transition-timing-funct...
...ion: ease-in-out; transition-property: width height background-color font-size left top transform -webkit-transform color; transition-duration: 0.5s; transition-timing-function: ease-in-out; } .
box1{ transform: rotate(270deg); -webkit-transform: rotate(270deg); width: 50px; height: 50px; background-color: blue; color: yellow; font-size: 18px; left: 150px; top: 25px; position: absolute; -webkit-transition-property: width height background-color font-size left top transform -webkit-transform color; -webkit-transition-duration: 0.5s; -webkit-transition-timing-function: ease-in-out; transition-property: width height background-color font-size left top transform -webkit-transformv color; transition-duration: 0.5s; transiti...
...on-timing-function: ease-in-out; } function updatetransition() { var el = document.queryselector("div.
box"); if (el) { el.classname = "
box1"; } else { el = document.queryselector("div.
box1"); el.classname = "
box"; } return el; } var intervalid = window.setinterval(updatetransition, 7000); transition-duration: 1s <div class="parent"> <div class="
box">lorem</div> </div> .parent { width: 250px; height:125px;} .
box { width: 100px; height: 100px; background-color: red; font-size: 20px; left: 0px; top: 0px; position: absolute; -webkit-transition-property: width height background-color font-size left top -webkit-transform color; -webkit-transition-duration: 1s; -webkit-transition-timing-function: ease-in-out;...
...And 24 more matches
Appendix D: Loading Scripts - Archive of obsolete content
<?xml version="1.0" encoding="utf-8"?> <!doctype overlay> <overlay id="script-overlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript;version=1.8" src="overlay.js"/> </overlay> evalinsand
box the components.utils.evalinsand
box method may be used to load arbitrary code into components.utils.sand
box objects.
... advantages namespacing: since scripts executed via evalinsand
box run in a defined namespace, global namespace contamination and the resultant extension compatibility issues are not usually a problem.
... flexibility: the evalinsand
box method accepts several parameters, including the url, line number, and javascript version of the file from which the code being evaluated was extracted.
...And 23 more matches
XUL element attributes - Archive of obsolete content
« xul reference home the following attributes are common to all xul elements: align type: one of the values below the align attribute specifies how child elements of the
box are aligned, when the size of the
box is larger than the total size of the children.
... for
boxes that have horizontal orientation, it specifies how its children will be aligned vertically.
... for
boxes that have vertical orientation, it specifies how its children will be aligned horizontally.
...And 23 more matches
XUL controls - Archive of obsolete content
button reference related elements: menupopup menuitem <check
box> a control that may be turned on and off, typically used to create options which may be enabled or disabled.
... <check
box label="show toolbar labels" checked="true"/> more information about the check
box element.
... check
box reference <colorpicker> a control that may be used to select a color.
...And 23 more matches
Timing element visibility with the Intersection Observer API - Web APIs
this
box will be populated using script later.
... articles each article is contained in an <article> element, styled like this: article { background-color: white; padding: 6px; } article:not(:last-child) { margin-bottom: 8px; } article h2 { margin-top: 0; } this creates article
boxes with a white background which float atop the blue background, with a small margin around the article.
...let's start with the global variables: let content
box; let nextarticleid = 1; let visibleads = new set(); let previouslyvisibleads = null; let adobserver; let refreshintervalid = 0; these are used as follows: content
box a reference to the <main> element's htmlelement object in the dom.
...And 23 more matches
Focus and Selection - Archive of obsolete content
if there are three text
boxes on a window, the one that has the focus is the one that the user can currently enter text into.
...example 2 : source view <script> function displayfocus(){ var elem=document.getelementbyid('sbar'); elem.setattribute('value','enter your phone number.'); } </script> <text
box id="t
box1"/> <text
box id="t
box2" onfocus="displayfocus();"/> <description id="sbar" value=""/> the focus event, when it occurs, will call the displayfocus function.
...window id="focus-example" title="focus example" onload="init();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> function init(){ addeventlistener("focus",setfocusedelement,true); } function setfocusedelement(){ var focused = document.commanddispatcher.focusedelement; document.getelementbyid("focused").value = focused.tagname; } </script> <h
box> <label control="username" value="user name:"/> <text
box id="username"/> </h
box> <button label="hello"/> <check
box label="remember this decision"/> <label id="focused" value="-no focus-"/> </window> in this example, a focus event handler is attached the window.
...And 22 more matches
Input Controls - Archive of obsolete content
xul has a similar element, text
box, used for text entry fields.
... without any attributes, the text
box element creates a
box in which the user can enter text.
... text
boxes accept many of the same attributes as html input controls.
...And 22 more matches
Theme changes in Firefox 2 - Archive of obsolete content
browser/safebrowsing/close16x16.png new file; this is the icon displayed in the safe browsing warning window as a close
box for the window.
... global/about.css new file; css used in the application's about
box.
... global/alltabs-
box-bkgnd.png new file; the background for the "all tabs" drop-down menu at the right side of the tab bar.
...And 22 more matches
Backgrounds and borders - Learn web development
prerequisites: basic computer literacy, basic software installed, basic knowledge of working with files, html basics (study introduction to html), and an idea of how css works (study css first steps.) objective: to learn how to style the background and border of
boxes.
... .
box { background: linear-gradient(105deg, rgba(255,255,255,.2) 39%, rgba(51,56,57,1) 96%) center center / 400px 200px no-repeat, url(big-star.png) center no-repeat, rebeccapurple; } we'll return to how the shorthand works later in the tutorial, but first let's have a look at the different things you can do with backgrounds in css, by looking at the individual background properties.
...a background-color extends underneath the content and padding
box of the element.
...And 22 more matches
Advanced form styling - Learn web development
to recap what we said in the previous article, we have: the bad: some elements are more difficult to style, requiring more complex css or some more specific tricks: check
boxes and radio buttons <input type="search"> the ugly: some elements can't be styled thoroughly using css.
...: </label> <input id="search" name="search" type="search"> </p> <p> <label for="text">text: </label> <input id="text" name="text" type="text"> </p> <p> <label for="date">date: </label> <input id="date" name="date" type="datetime-local"> </p> <p> <label for="radio">radio: </label> <input id="radio" name="radio" type="radio"> </p> <p> <label for="check
box">check
box: </label> <input id="check
box" name="check
box" type="check
box"> </p> <p><input type="submit" value="submit"></p> <p><input type="button" value="button"></p> </form> applying the following css to them removes system-level styling.
...in a couple of cases — search and radio buttons/check
boxes, it becomes way more useful.
...And 22 more matches
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
boxes every element is a
box with some sort of content, and has a background and a border in addition to whatever contents the
box may have.
... borders see the section borders for a list of the css properties you can use to set the colors of a
box's borders.
...see
box properties in the
box model to learn about the relationship between elements and their borders, and the article styling borders using css to learn more about applying styles to borders.
...And 22 more matches
Modifying a XUL Interface - Archive of obsolete content
for example, the following will add a button to a xul window: example 1 : source view <script> function addbutton(){ var a
box = document.getelementbyid("a
box"); var button = document.createelement("button"); button.setattribute("label","a new button"); a
box.appendchild(button); } </script> <
box id="a
box" width="200"> <button label="add" oncommand="addbutton();"/> </
box> this example has two parts a
box container element in xul.
... notice that this is not the same as a v
box or an h
box.
... (this is discussed more in the
box model pages.) the
box element has two attributes "id" and "width".
...And 21 more matches
WebGL model view projection - Web APIs
webgl
box example this example will create a custom webgl
box object that will draw a 2d
box on the screen.
... note: the code for each webgl
box example is available in this github repo and is organized by section.
... webgl
box constructor the constructor looks like this: function webgl
box() { // setup the canvas and webgl context this.canvas = document.getelementbyid('canvas'); this.canvas.width = window.innerwidth; this.canvas.height = window.innerheight; this.gl = mdn.createcontext(canvas); var gl = this.gl; // setup a webgl program, anything part of the mdn object is defined outside of this article this.webglprogram = mdn.createwebglprogramfromids(gl, 'vertex-shader', 'fragment-shader'); gl.useprogram(this.webglprogram); // save the attribute and uniform locations this.positionlocation = gl.getattriblocation(this.webglprogram, 'position'); this.colorlocation = gl.getuniformlocation(this.webglprogram, 'col...
...And 21 more matches
Introduction to CSS layout - Learn web development
the page layout techniques we'll be covering in more detail in this module are normal flow the display property flex
box grid floats positioning table layout multiple-column layout each technique has its uses, advantages, and disadvantages, and no technique is designed to be used in isolation.
... the methods that can change how elements are laid out in css are as follows: the display property — standard values such as block, inline or inline-block can change how elements behave in normal flow, for example making a block-level element behave like an inline element (see types of css
boxes for more information).
... we also have entire layout methods that are switched on via specific display values, for example css grid and flex
box, which alter how elements inside the element they are set on are laid out.
...And 20 more matches
CSS property compatibility table for form controls - Learn web development
property n t note css
box model width yes yes height partial[1][2] yes webkit browsers (mostly on mac osx and ios) use the native look & feel for the search fields.
...
box-shadow no partial[1] ie9 does not support this property.
... property n t note css
box model width yes yes height partial[1] yes this property is not applied on webkit based browsers on mac osx or ios.
...And 20 more matches
Index - Learn web development
every time a web page does more than just sit there and display static information for you to look at—displaying timely content updates, interactive maps, animated 2d/3d graphics, scrolling video juke
boxes, or more—you can bet that javascript is probably involved.
...for example, if the user selects a button on a webpage, you might want to respond to that action by displaying an information
box.
... 104 a cool-looking
box assessment, beginner, css, learn, backgrounds, borders,
box,
box model, effects in this assessment, you'll get some more practice in creating cool-looking
boxes by trying to create an eye-catching
box.
...And 20 more matches
Intersection Observer API - Web APIs
it uses a vendor-provided library to manage the advertisements placed periodically throughout the page, has animated graphics here and there, and uses a custom library that draws notification
boxes and the like.
...this set of values serves to grow or shrink each side of the root element's bounding
box before computing intersections.
...the values in rootmargin define offsets added to each side of the intersection root's bounding
box to create the final intersection root bounds (which are disclosed in intersectionobserverentry.rootbounds when the callback is executed).
...And 20 more matches
Basic Shapes - CSS: Cascading Style Sheets
before looking at the shapes, it is worth understanding two pieces of information that go together to make these shapes possible: the <basic-shape> type the reference
box the <basic-shape> type the <basic-shape> type is used as the value for all of our basic shapes.
... the reference
box understanding the reference
box used by css shapes is important when using basic shapes, as it defines each shape's coordinate system.
... you have already met the reference
box in the guide on creating shapes from
box values, which directly uses the reference
box to create the shape.
...And 20 more matches
Adapting to the new two-value syntax of display - CSS: Cascading Style Sheets
for example to make a heading inline we would use the following css: h1 { display: inline; } more recently we have gained css grid layout and flex
box.
...only when the value of display is changed do the children become flex or grid items and begin to respond to the other properties in the grid or flex
box specifications.
... what grid and flex
box demonstrate, however, is that an element has both an outer and an inner display type.
...And 19 more matches
List Controls - Archive of obsolete content
« previousnext » xul has a number of types of elements for creating list
boxes.
... list
boxes a list
box is used to display a number of items in a list.
...xul provides two types of elements to create lists, a list
box element to create multi-row list
boxes, and a menulist element to create drop-down list
boxes.
...And 18 more matches
Overflowing content - Learn web development
everything in css is a
box.
... you can constrain the size of these
boxes by assigning values of width and height (or inline-size and block-size).
... overflow happens when there is too much content to fit in a
box.
...And 18 more matches
Build your own function - Learn web development
it will display a custom message
box on a web page and will act as a customized replacement for a browser's built-in alert() function.
...type the following in your browser's javascript console, on any page you like: alert('this is a message'); the alert function takes a single argument — the string that is displayed in the alert
box.
...we've also provided some basic css to style the custom message
box, and an empty <script> element to put our javascript in.
...And 18 more matches
Border-image generator - CSS: Cascading Style Sheets
section"> <div id="toggle-gallery" data-action="hide"> </div> <div id="load-image" class="button"> upload image </div> <input id="remote-url" type="text" placeholder="load an image from url"/> <div id="load-remote" class="button"> </div> </div> <div id="general-controls" class="group section"> <div class="name"> control
box </div> <div class="separator"></div> <div class="property"> <div class="name">scale</div> <div class="ui-input-slider" data-topic="scale" data-unit="%" data-max="300" data-sensivity="10"> </div> </div> <div class="separator"></div> <div class="property"> ...
...<div class="name">draggable</div> <div class="ui-check
box" data-topic='drag-subject'></div> </div> <div class="property right"> <div class="name">section height</div> <div class="ui-input-slider" data-topic="preview-area-height" data-min="400" data-max="1000"> </div> </div> </div> <div id="preview_section" class="group section"> <div id="subject"> <div class="guideline" data-axis="y" data-topic="slice-top"></div> <div class="guideline" data-axis="x" data-topic="slice-right"></div> <div class="guideline" data-axis="y" data-topic="slice-bottom"></div> <div class="guideline" data-axis="...
...review"> </div> </div> <!-- controls --> <div id="controls" class="group section"> <!-- border-image-slice --> <div id="border-slice-control" class="category"> <div class="title"> border-image-slice </div> <div class="property"> <div class="name">fill</div> <div class="ui-check
box" data-topic='slice-fill'></div> </div> </div> <!-- border-image-width --> <div id="border-width-control" class="category"> <div class="title"> border-image-width </div> </div> <!-- border-image-outset --> <div id="border-outset-control" class="category"> <div class="title"> bo...
...And 18 more matches
mix-blend-mode - CSS: Cascading Style Sheets
ion | color | luminosity examples effect of different mix-blend-mode values <div class="grid"> <div class="col"> <div class="note">blending in isolation (no blending with the background)</div> <div class="row isolate"> <div class="cell"> normal <div class="container normal"> <div class="group"> <div class="item firefox"></div> <svg view
box="0 0 150 150"> <defs> <lineargradient id="red"> <stop offset="0" stop-color="hsl(0,100%,50%)" /> <stop offset="100%" stop-color="hsl(0,0%,100%)" /> </lineargradient> <lineargradient id="green"> <stop offset="0" stop-color="hsl(120,100%,50%)" /> <stop offset="...
...e> <ellipse class="item g" cx="75" cy="75" rx="25" ry="70"></ellipse> <ellipse class="item b" cx="75" cy="75" rx="25" ry="70"></ellipse> </svg> </div> </div> </div> <div class="cell"> multiply <div class="container multiply"> <div class="group"> <div class="item firefox"></div> <svg view
box="0 0 150 150"> <ellipse class="item r" cx="75" cy="75" rx="25" ry="70"></ellipse> <ellipse class="item g" cx="75" cy="75" rx="25" ry="70"></ellipse> <ellipse class="item b" cx="75" cy="75" rx="25" ry="70"></ellipse> </svg> </div> </div> </div> <div class="cell"> darken <div class="container darken"> ...
... <div class="group"> <div class="item firefox"></div> <svg view
box="0 0 150 150"> <ellipse class="item r" cx="75" cy="75" rx="25" ry="70"></ellipse> <ellipse class="item g" cx="75" cy="75" rx="25" ry="70"></ellipse> <ellipse class="item b" cx="75" cy="75" rx="25" ry="70"></ellipse> </svg> </div> </div> </div> <div class="cell"> screen <div class="container screen"> <div class="group"> <div class="item firefox"></div> <svg view
box="0 0 150 150"> <ellipse class="item r" cx="75" cy="75" rx="25" ry="70"></ellipse> <ellipse class="item g" cx="75" cy="75" rx="25" ry="70"></ellipse> <ellipse class="item b" c...
...And 18 more matches
XUL accessibility guidelines - Archive of obsolete content
other elements, such as arrowscroll
box and list
box, are made to scroll automatically.
...the arrowscroll
box, for example, is a non-focusable element and cannot be scrolled using a keyboard.
... a list
box, however, can receive focus so its contents can scroll.
...And 17 more matches
Advanced styling effects - Learn web development
this article acts as a
box of tricks, providing an introduction to some interesting advanced styling features such as
box shadows, blend modes, and filters.
...
box shadows
box-shadow allows you to apply one or more drop shadows to an element's
box.
... like text shadows,
box shadows are supported pretty well across browsers, including ie9+ and edge.
...And 17 more matches
Images, media, and form elements - Learn web development
images, other media, and form elements behave a little differently in terms of your ability to style them with css than regular
boxes.
... sizing images as you already know from following these lessons, everything in css generates a
box.
... if you place an image inside a
box that is smaller or larger than the intrinsic dimensions of the image file in either direction, it will either appear smaller than the
box, or overflow the
box.
...And 17 more matches
Legacy layout methods - Learn web development
prerequisites: html basics (study introduction to html), and an idea of how css works (study introduction to css and styling
boxes.) objective: to understand the fundamental concepts behind the grid layout systems used prior to css grid layout being available in browsers.
... this lesson will explain how grid systems and grid frameworks based on floats and flex
box work.
...this leaves us with 960 pixels for our total column/gutter widths — in this case, the padding is subtracted from the total content width because we have set
box-sizing to border-
box on all elements on the site (see changing the
box model completely for more explanation).
...And 17 more matches
ARIA Test Cases - Accessibility
- - - voiceover (leopard) n/a n/a - fail window-eyes - - - - nvda - n/a - - zoom (leopard) pass n/a pass pass zoomtext - - - - orca - - - - check
box simple check
box testcases: set aria-checked="false" for unchecked both remove or set attribute for unchecked case -- also includes an invalid and required check
box hierarchical (newly added test not in test results yet) dojo nightly build expected at behavior: screen reader should speak the accessible name followed by both the type being check
box and the state (checked, unchecked).
... markup used: role="check
box" aria-checked="true" or "false" notes: need testcase where aria-checked attribute is removed instead of set to false results: at firefox ie opera safari jaws 9 - - n/a n/a jaws 10 pass fail (changes not spoken) fail fail voiceover (leopard) n/a n/a - fail window-eyes pass pass fail (unchecked presented as checked, ie exposing incorrect state for no aria-checked attribute) fail fail nvda fail on #2 -- repetitive text spoken, first check
box toggle speaks incorrect state n/a fail fail zoom (leopard) pass n/a pass pass ...
... zoomtext pass - fail fail orca pass n/a - - tristate check
box testcases: both remove or unset for unchecked case expected at behavior: screen reader should announce accessible name, role and state.
...And 17 more matches
Aligning Items in a Flex Container - CSS: Cascading Style Sheets
one of the reasons that flex
box quickly caught the interest of web developers is that it brought proper alignment capabilities to the web for the first time.
... it enabled proper vertical alignment, so we can at last easily center a
box.
... in this guide, we will take a thorough look at how the alignment and justification properties work in flex
box.
...And 17 more matches
Line-based placement with CSS Grid - CSS: Cascading Style Sheets
* {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; 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-template-rows: repeat(3, 100px); } <div class="wra...
...pper"> <div class="
box1">one</div> <div class="
box2">two</div> <div class="
box3">three</div> <div class="
box4">four</div> </div> positioning items by line number we can use line-based placement to control where these items sit on the grid.
... .
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.
...And 17 more matches
User Notifications and Alerts - Archive of obsolete content
the notification
box element you have probably seen these before.
...they are thin
boxes that appear from beneath the tab list and above the page content, with some text and maybe a few buttons.
... this kind of notification is implemented with a notification
box.
...And 16 more matches
Web audio spatialization basics - Web APIs
3d boom
box demo to demonstrate 3d spatialization we've created a modified version of the boom
box demo we created in our basic using the web audio api guide.
... the boom
box sits inside a room (defined by the edges of the browser viewport), and in this demo, we can move and rotate it with the provided controls.
... when we move the boom
box, the sound it produces changes accordingly, panning as it moves to the left or right of the room, or becoming quieter as it is moved away from the user or is rotated so the speakers are facing away from them, etc.
...And 16 more matches
Logical properties for margins, borders and padding - CSS: Cascading Style Sheets
margin-inline-end margin-right margin-inline-start margin-left padding-block-end padding-bottom padding-block-start padding-top padding-inline-end padding-right padding-inline-start padding-left there are also some additional shorthands, made possible because we have the ability to target both block or both inline edges of the
box simultaneously.
... in the example below i have created two
boxes and added different sized margins to each edge.
... one
box uses physical properties and the other logical properties.
...And 16 more matches
<input type="email"> - HTML: Hypertext Markup Language
a placeholder is a value that demonstrates the form the value should take by presenting an example of a valid value, which is displayed inside the edit
box when the element's value is "".
... once data is entered into the
box, the placeholder disappears; if the
box is emptied, the placeholder reappears.
... <input type="email" placeholder="sophie@example.com"> controlling the input size you can control not only the physical length of the input
box, but also the minimum and maximum lengths allowed for the input text itself.
...And 16 more matches
tree - Archive of obsolete content
attributes disablekeynavigation, disabled, editable, enablecolumndrag, flags, hidecolumnpicker, onselect, rows, seltype, statedatasource, tabindex, treelines properties accessibletype, builderview, columns, contentview, currentindex, disablekeynavigation, disabled, editingcolumn, editingrow, enablecolumndrag, firstordinalcolumn, inputfield, seltype, selstyle, tabindex, tree
boxobject, view examples a tree with several columns <tree flex="1" rows="2"> <treecols> <treecol id="sender" label="sender" flex="1"/> <treecol id="subject" label="subject" flex="2"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="joe@somewhere.com"/> <treecell label="top secret plans"/> </treerow> </treeitem> <treeitem> ...
...(default in list
box and richlist
box.) multiple multiple rows may be selected at once.
... for richlist
box, this is new in firefox 3.5.
...And 15 more matches
Building up a basic demo with PlayCanvas editor - Game development
creating a new project start a brand new project by clicking on the new button: the resulting dialog
box will show a few different options.
...an entity is any object used in the scene — it cna be an object like a
box, cylinder or cone, but it can also be a camera, light or sound source.
...go ahead and click
box — it will be added to the scene.
...And 15 more matches
Debugging CSS - Learn web development
perhaps you believe that a certain selector should match an element, but nothing happens, or a
box is a different size than you expected.
...for example in firefox there are some excellent tools for working visually with css layout, allowing you to inspect and edit grid layouts, flex
box, and shapes.
...try selecting the element with the class of
box1; this is the first element on the page with a bordered
box drawn around it.
...And 15 more matches
UI pseudo-classes - Learn web development
this included some usage of pseudo-classes, for example using :checked to target a check
box only when it is selected.
... :checked, :indeterminate, and :default: respectively target check
boxes and radio buttons that are checked, in an indeterminate state (neither checked or not checked), and the default selected option when the page loads (e.g.
... an <input type="check
box"> with the checked attribute set, or an <option> element with the selected attribute set).
...And 15 more matches
nsIAccessibleText
wchar getcharacteratoffset( in long offset ); parameters offset return value getcharacterextents() returns the bounding
box of the specified position.
...because it does not represent an existing character its bounding
box is defined in relation to preceding characters.
... it should be roughly equivalent to the bounding
box of some character when inserted at the end of the text.
...And 15 more matches
Adding sidebars - Archive of obsolete content
<menupopup id="viewsidebarmenu"> <menuitem id="xulschoolhello-sidebar" label="&xulschoolhello.sidebar.title;" accesskey="&xulschoolhello.sidebar.accesskey;" type="check
box" autocheck="false" group="sidebar" sidebarurl="chrome://xulschoolhello/content/sidebar.xul" sidebartitle="&xulschoolhello.sidebar.title;" oncommand="togglesidebar('xulschoolhello-sidebar');" /> </menupopup> the example in the mdc page includes a shortcut key combination to toggle the new sidebar.
... the tab
box element the « xul reference « element creates a tabbed view of one or more tabpanel elements.
... you can see an example of a tab
box element if you open the firefox preferences window and select the advanced section.
...And 14 more matches
Images, Tables, and Mysterious Gaps - Archive of obsolete content
how inline content is constructed in order to understand what just happened, let's take a look at the construction of a line
box, the placement of images within a line
box, and the placement of a line
box within a table cell.
... first a basic line
box containing text, shown in figure 3.
... the most crucial part of figure 3 is the baseline (represented by the blue line), and its placement within the line
box.
...And 14 more matches
nsIAccessibleRole
role_dialog 18 represents a dialog
box or message
box.
...it is used for html:textfield, xul:group
box, role="group".
... role_list 33 represents a list
box, allowing the user to select one or more items.
...And 14 more matches
Using the CSS Painting API - Web APIs
fillrect(0, 15, 200, 20) results in the creation of a rectangle that is 200 units wide by 20 units tall, positioned 0 units from the left and 15 units from the top of the content
box.
... we can use the css background-size and background-position properties to re-size or relocate this background image, but this is the default size and placement of the yellow
box we created in our paint worklet.
... .fancy { background-image: paint(headerhighlight); } putting it together we can then add the fancy class to any element on the page to add a yellow
box as a background: <h1 class="fancy">my cool header</h1> the following example will look like the image above in browsers supporting the css painting api.
...And 14 more matches
shape-outside - CSS: Cascading Style Sheets
by default, inline content wraps around its margin
box; shape-outside provides a way to customize this wrapping, making it possible to wrap text around complex objects rather than simple
boxes.
... syntax /* keyword values */ shape-outside: none; shape-outside: margin-
box; shape-outside: content-
box; shape-outside: border-
box; shape-outside: padding-
box; /* function values */ shape-outside: circle(); shape-outside: ellipse(); shape-outside: inset(10px 10px 10px 10px); shape-outside: polygon(10px 10px, 20px 20px, 30px 30px); shape-outside: path('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'); /* <url> value */ shape-outside: url(image.png); /* <gradient> value */ shape-outside: linear-gradient(45deg, rgba(255,...
...inline content wraps around the element's margin
box, like usual.
...And 14 more matches
Sizing items in CSS - Learn web development
in the case of a
box inside another container, if you give the child
box a percentage width it will be a percentage of the width of the parent container.
...in the below example we have a
box.
... we have given the inner
box a margin of 10% and a padding of 10%.
...And 13 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
they need to know about focus changes and other events, and it needs to know what objects are contained in the current document or dialog
box.
... a set of system messages that confer accessibility-related events such as focus changes, changes to document content and state changes in ui objects like check
boxes.
...[important] get_accname: get the "name" of the iaccessible, for example the name of a button, check
box or menu item.
...And 13 more matches
Basic Concepts of grid layout - CSS: Cascading Style Sheets
grid is a powerful specification that, when combined with other parts of css such as flex
box, can help you create layouts that were previously impossible to build in css.
... .wrapper { display: grid; } * {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } all the direct children are now grid items.
... <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> .wrapper { display: grid; grid-template-columns: 200px 200px 200px; } * {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } the fr unit tracks can be defined using any length unit.
...And 13 more matches
break-after - CSS: Cascading Style Sheets
the break-after css property sets how page, column, or region breaks should behave after a generated
box.
... if there is no generated
box, the property is ignored.
... values generic break values auto allows, but does not force, any break (page, column, or region) to be inserted right after the principal
box.
...And 13 more matches
break-before - CSS: Cascading Style Sheets
the break-before css property sets how page, column, or region breaks should behave before a generated
box.
... if there is no generated
box, the property is ignored.
... values generic break values auto allows, but does not force, any break (page, column, or region) to be inserted right before the principal
box.
...And 13 more matches
mask-origin - CSS: Cascading Style Sheets
/* keyword values */ mask-origin: content-
box; mask-origin: padding-
box; mask-origin: border-
box; mask-origin: margin-
box; mask-origin: fill-
box; mask-origin: stroke-
box; mask-origin: view-
box; /* multiple values */ mask-origin: padding-
box, content-
box; mask-origin: view-
box, fill-
box, border-
box; /* non-standard keyword values */ -webkit-mask-origin: content; -webkit-mask-origin: padding; -webkit-mask-origin: border; /* global values */ mask-origin: inherit; mask-origin: initial; mask-origin: unset; for elements rendered as a single
box, this property specifies the mask positioning area.
...for elements rendered as multiple
boxes, such as inline
boxes on several lines or
boxes on several pages, it specifies which
boxes
box-decoration-break operates upon to determine the mask positioning area.
... values content-
box the position is relative to the content
box.
...And 13 more matches
Manipulating Lists - Archive of obsolete content
« previousnext » the xul list
box provides a number of specialized methods.
... list manipulation the list
box element provides numerous methods to retrieve and manipulate its items.
... although list
boxes may be manipulated using the standard dom functions as well, it is recommended that the specialized list
box functions be used instead when possible.
...And 12 more matches
Numeric Controls - Archive of obsolete content
number fields a text
box may be used for entering numbers by setting the value of the type attribute to the value number.
... this type of text
box may only be used to enter numbers.
...in addition, arrow buttons appear beside the text
box to allow the user to cycle through the values.
...And 12 more matches
Using Spacers - Archive of obsolete content
xul uses a layout system called the '
box model'.
... we'll talk more about this in the next section but it essentially allows you to divide a window into a series of
boxes that hold elements.
... the
boxes will be positioned and resized based on specifications that you can define.
...And 12 more matches
dev/panel - Archive of obsolete content
most of the firefox developer tools are hosted in a ui component called the tool
box.
... individual built-in tools, such as the javascript debugger or the web console, occupy "panels" in the tool
box.
... with the dev/panel module, you can create your own panels in the tool
box: the panel gets a tab in the tool
box toolbar which enables the user to open it: you specify the panel's content and behavior using html, css, and javascript.
...And 11 more matches
align - Archive of obsolete content
« xul reference home align type: one of the values below the align attribute specifies how child elements of the
box are aligned, when the size of the
box is larger than the total size of the children.
... for
boxes that have horizontal orientation, it specifies how its children will be aligned vertically.
... for
boxes that have vertical orientation, it specifies how its children will be aligned horizontally.
...And 11 more matches
Tree Widget Changes - Archive of obsolete content
some specific changes you should now get the tree selection object from the view, not the
box object, meaning use tree.view.selection instead of tree.tree
boxobject.selection.
... use tree.columns[1].id instead of tree.tree
boxobject.getcolumnid(1) to get the id of a column, in this case column 1.
... use tree.columns.getkeycolumn().index instead of tree.tree
boxobject.getkeycolumnindex().
...And 11 more matches
Commands - Archive of obsolete content
you might use this to have a list
box respond to cut, copy and paste operations, for instance.
...by default, only text
boxes have a controller that does anything.
... the text
box controller handles clipboard operations, selection, undo and redo as well as some editing operations.
...And 11 more matches
attribute.align - Archive of obsolete content
summary the align attribute specifies how child elements of the
box are aligned, when the size of the
box is larger than the total size of the children.
... for
boxes that have horizontal orientation, it specifies how its children will be aligned vertically.
... for
boxes that have vertical orientation, it is used to specify how its children are algined horizontally.
...And 11 more matches
toolbarbutton - Archive of obsolete content
r, disabled, dlgtype, group, image, label, oncommand, open, orient, tabindex, title, type, validate properties accesskey, accessibletype, autocheck, checkstate, checked, command, crop, dir, disabled, dlgtype, group, image, label, open, orient, tabindex, type examples <toolbar id="test-toolbar"> <toolbarbutton accesskey="p" label="plain"/> <toolbarbutton accesskey="c" label="check
box" type="check
box"/> <toolbarbutton accesskey="b" label="menu-button" type="menu-button"> <menupopup> <menuitem label="menu item 1"/> <menuitem label="menu item 2"/> </menupopup> </toolbarbutton> <toolbarbutton accesskey="m" label="menu" type="menu"> <menupopup> <menuitem label="menu item 1"/> <menuitem label="menu item 2"/> </menupopup> </toolbarbutt...
...when autocheck is true, the button type should be "check
box" or "radio".
...this means that the button acts like a check
box except that there is a third state which must be set manually by adjusting the check state.
...And 11 more matches
treecol - Archive of obsolete content
attributes crop, cycler, dragging, editable, fixed, hidden, hideheader, ignoreincolumnpicker, label, primary, sort, sortactive, sortdirection, src, type, width properties accessibletype style classes treecol-image examples this example shows a check
box in the first column, requires the style below.
... <tree flex="1" editable="true"> <treecols> <treecol label="active" type="check
box" editable="true"/> <treecol label="name" flex="1" /> </treecols> <treechildren> <treeitem> <treerow> <treecell value="true"/> <treecell label="alice"/> </treerow> </treeitem> <treeitem> <treerow> <treecell value="false"/> <treecell label="bob"/> </treerow> </treeitem> </treechildren> </tree> to make the check
box visible on some platforms, the following styles need to be added to the stylesheet (see treecol.type).
...if targeting firefox for mac os x, be sure to use these styles but include your own check
box image.
...And 11 more matches
XForms Input Element - Archive of obsolete content
mozilla extensions labelposition - only for boolean types: show the label before or after the check
box (see below) type restrictions the input element can be bound to a node containing simple content of any data type except xsd:base64binary, xsd:hexbinray or any data type derived from these.
... representations the xforms input element can be represented by the following widgets for the spcified data types (or types derived from these data types): text field - the default widget when no type is specified or the data is of type xsd:string (xhtml/xul) check
box - used for xsd:boolean instance data.
...analogous widgets are <xhtml:input type="text"/> and <xul:text
box/> specific handling of attributes incremental - if "true", the bound instance node will be updated on each character typed by the user.
...And 11 more matches
CSS values and units - Learn web development
the first
box has a width set in pixels.
... the second
box has a width set in vw (viewport width) units.
...if you change the width of your browser window, the size of the
box should change, however this example is embedded into the page using an <iframe>, so this won't work.
...And 11 more matches
Supporting older browsers - Learn web development
previous overview: css layout next in this module, we recommend using flex
box and grid as the main layout methods for your designs.
... prerequisites: html basics (study introduction to html), and an idea of how css works (study introduction to css and styling
boxes.) objective: to understand how to provide support for your layouts on older browsers that might not support the features you want to use.
...any browser that does not support css grid layout will see the row of
boxes as a floated layout.
...And 11 more matches
Creating our first Vue component - Learn web development
inside that <div>, let's add a check
box and a corresponding label.
... add an id to the check
box, and a for attribute mapping the check
box to the label, as shown below.
... <template> <div> <input type="check
box" id="todo-item" checked="false" /> <label for="todo-item">my todo item</label> </div> </template> using todoitem inside our app this is all fine, but we haven’t added the component to our app yet, so there’s no way to test it and see if everything is working.
...And 11 more matches
TextMetrics - Web APIs
textmetrics.actualbounding
boxleft read only is a double giving the distance from the alignment point given by the canvasrenderingcontext2d.textalign property to the left side of the bounding rectangle of the given text, in css pixels.
... textmetrics.actualbounding
boxright read only is a double giving the distance from the alignment point given by the canvasrenderingcontext2d.textalign property to the right side of the bounding rectangle of the given text, in css pixels.
... textmetrics.fontbounding
boxascent read only is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline attribute to the top of the highest bounding rectangle of all the fonts used to render the text, in css pixels.
...And 11 more matches
Color picker tool - CSS: Cascading Style Sheets
nput[data-topic="alpha"] > .name { width: 60px; } .ui-color-picker .input[data-topic="alpha"] > input { float: right; } .ui-color-picker .input[data-topic="hexa"] { width: auto; float: right; margin: 6px 8px 0 0; } .ui-color-picker .input[data-topic="hexa"] > .name { display: none; } .ui-color-picker .input[data-topic="hexa"] > input { width: 90px; height: 24px; padding: 2px 0; -moz-
box-sizing: border-
box; -webkit-
box-sizing: border-
box;
box-sizing: border-
box; } /* preview color */ .ui-color-picker .preview { width: 95px; height: 53px; margin: 5px; margin-top: 10px; border: 1px solid #ddd; background-image: url("https://mdn.mozillademos.org/files/5705/alpha.png"); float: left; position: relative; } .ui-color-picker .preview:before { height: 100%; width: 50%; left...
...er { background-color: #ccc; cursor: pointer; } /* * ui component */ .ui-input-slider { height: 20px; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input-slider * { float: left; height: 100%; line-height: 100%; } /* input slider */ .ui-input-slider > input { margin: 0; padding: 0; width: 50px; text-align: center; -moz-
box-sizing: border-
box; -webkit-
box-sizing: border-
box;
box-sizing: border-
box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px; text-align: right; text-transform: lowercase; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center left no-repeat; } .ui-input-slider-right {...
...rm: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px; text-align: center; } .ui-input-slider-btn-set:hover { background-color: #379b4a; cursor: pointer; } /* * color picker tool */ body { max-width: 1000px; margin: 0 auto; font-family: "segoe ui", arial, helvetica, sans-serif;
box-shadow: 0 0 5px 0 #999; -moz-
box-sizing: border-
box; -webkit-
box-sizing: border-
box;
box-sizing: border-
box; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } /** * resize handle */ .resize-handle { width: 10px; height: 10px; background: url('https://mdn.mozillademos.org/files/6083/resize.png') center center no-repeat; position: absolu...
...And 11 more matches
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
fully understanding how these properties work with growing and shrinking items is the real key to mastering flex
box.
... .item { flex: 2 1 auto; } if you have read the article basic concepts of flex
box, then you will have already had an introduction to the properties.
...it would overflow the
box it is in if that container was too narrow.
...And 11 more matches
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
syntax /* css basic user interface module level 4 values */ appearance: none; appearance: auto; appearance: menulist-button; appearance: textfield; /* "compat-auto" values, which have the same effect as 'auto' */ appearance: button; appearance: searchfield; appearance: textarea; appearance: push-button; appearance: slider-horizontal; appearance: check
box; appearance: radio; appearance: square-button; appearance: menulist; appearance: list
box; appearance: meter; appearance: progress-bar; /* partial list of available values in gecko */ -moz-appearance: scrollbarbutton-up; -moz-appearance: button-bevel; /* partial list of available values in webkit/blink (as well as gecko and edge) */ -webkit-appearance: media-mute-button; -webkit-appearance: care...
... check
box div { color: black; -moz-appearance: check
box; -webkit-appearance: check
box; } <div>lorem</div> firefox chrome safari edge the element is drawn like a check
box, including only the actual "check
box" portion.
... list
box div { color: black; height:20px; -moz-appearance: list
box; -webkit-appearance: list
box; } <div>lorem</div> firefox chrome safari edge menulist div { color: black; -moz-appearance: menulist; -webkit-appearance: menulist; } <div>lorem</div> firefox chrome safari edge meter div{ color: black; -webkit-appearance: meter; } <div>lorem</div> chrome safari firefox progress-bar div{ color: black; -webkit-appearance: progress-bar; } <div>lorem</div> chrome safari firefox push-button div{ color: black; -webkit-appearance: push-button; } <div>lorem</div> chrome safari edge ...
...And 11 more matches
mask-clip - CSS: Cascading Style Sheets
/* <geometry-
box> values */ mask-clip: content-
box; mask-clip: padding-
box; mask-clip: border-
box; mask-clip: margin-
box; mask-clip: fill-
box; mask-clip: stroke-
box; mask-clip: view-
box; /* keyword values */ mask-clip: no-clip; /* non-standard keyword values */ -webkit-mask-clip: border; -webkit-mask-clip: padding; -webkit-mask-clip: content; -webkit-mask-clip: text; /* multiple values */ mask-clip: padding-
box, no-clip; mask-clip: view-
box, fill-
box, border-
box; /* global values */ mask-clip: inherit; mask-clip: initial; mask-clip: unset; syntax one or more of the keyword values listed below, separated by commas.
... values content-
box the painted content is clipped to the content
box.
... padding-
box the painted content is clipped to the padding
box.
...And 11 more matches
Adding more elements - Archive of obsolete content
« previousnext » we will conclude the discussion of
boxes by adding some
boxes to the find files dialog.
...<h
box> <menulist id="searchtype"> <menupopup> <menuitem label="name"/> <menuitem label="size"/> <menuitem label="date modified"/> </menupopup> </menulist> <spacer style="width: 10px;"/> <menulist id="searchmode"> <menupopup> <menuitem label="is"/> <menuitem label="is not"/> </menupopup> </menulist> <spacer style="width: 10px;"/> <text
box id="find-text" flex="1" style="min-width: 15em;"/> </h
box> two drop down
boxes have been added to the dialog.
...you will notice that if the window is resized, the text
box grows but the other components do not.
...And 10 more matches
Splitters - Archive of obsolete content
splitting a
box there may be times when you want to have two sections of a window where the user can resize the sections.
...you can place a splitter anywhere you want and it will allow resizing of the elements that come before it and the elements that come after it in the same
box.
... when a splitter is placed inside a horizontal
box, it will allow resizing horizontally.
...And 10 more matches
Templates - Archive of obsolete content
example 1 : source <v
box datasources="rdf:bookmarks" ref="nc:bookmarksroot" flex="1"> <template> <button uri="rdf:*" label="rdf:http://home.netscape.com/nc-rdf#name"/> </template> </v
box> here, a vertical
box has been created that will contain a column of buttons, one for each top-level bookmark.
...(you may have to focus the window for it to change.) container and datasources the template itself is placed inside a vertical
box.
... the
box has two special attributes that allow it to be used for templates, which are used to specify where the data comes from.
...And 10 more matches
Toolbars - Archive of obsolete content
adding a toolbar like a number of elements, xul toolbars are a type of
box.
...for example, the mozilla browser window contains a text
box that displays the page url.
...of course you wouldn't normally put a text
box in a vertical toolbar.
...And 10 more matches
Tree View Details - Archive of obsolete content
first, the simple functions: { tree
box: null, selection: null, get rowcount() { return this.visibledata.length; }, settree: function(tree
box) { this.tree
box = tree
box; }, getcelltext: function(idx, column) { return this.visibledata[idx][0]; }, iscontainer: function(idx) { return this.visibledata[idx][1]; }, iscontaineropen: function(idx) { return this.visibledata[idx][2]; }, iscont...
... the settree function will be called to set the tree's
box object.
... the tree
box object is a specialized type of
box object specific to trees and will be examined in detail in the next section.
...And 10 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
this is defined by the layout mode; it is usually the alignment subject’s containing block, and assumes the writing mode of the
box establishing the containing block.
... 17 alignment subject alignment subject, css, glossary, alignment in css
box alignment the alignment subject is the thing (or things) being aligned by the property.
... 39 bounding
box bounding
box, codingscripting, design, glossary the bounding
box of an element is the smallest possible rectangle (aligned with the axes of that element's user coordinate system) that entirely encloses it and its descendants.
...And 10 more matches
How to build custom form controls - Learn web development
.select .active, .select:focus { outline: none; /* this
box-shadow property is not exactly required, however it's imperative to ensure active state is visible, especially to keyboard users, that we use it as a default value.
... */
box-shadow: 0 0 3px 1px #227755; } now, let's handle the list of options: /* the .select selector here helps to make we only select element inside our control.
... if you are lost with px to em conversion, try http://riddle.pl/emcalc/ */ font-size : 0.625em; /* this (10px) is the new font size context for em value in this context */ font-family : verdana, arial, sans-serif;
box-sizing : border-
box; /* we need extra room for the down arrow we will add */ padding : .1em 2.5em .2em .5em; width : 10em; /* 100px */ border : .2em solid #000; border-radius : .4em;
box-shadow : 0 .1em .2em rgba(0,0,0,.45); /* the first declaration is for browsers that do not support linear gradients.
...And 10 more matches
Accessibility API cross-reference
a check
box; aria has two kinds: use check
box if you need to express 'mixed' state (some of the descendents are true, some are false), otherwise use switch or (preferred in html) <input type=check
box>, which are true/false only.
... checkbutton check_
box check_
box check
box or switch <input type=check
box> pretty obvious what this is for clock n/a n/a timer <time> column of cells in a table - how would the user specifically point to this, as opposed to the column header or cells?
... column n/a n/a n/a the heading of a table's column columnheader column_header column_header, table_column_header columnheader <th scope=col> edit control with drop down list
box, different from droplist combo
box combo_
box combo_
box combo
box abstract role - a form of widget that performs an action but does not receive input data.
...And 10 more matches
Accessible Toolkit Checklist
for example, lists of check
boxes are implemented in windows with images of checked and unchecked check
boxes.
... most widgets (like check
boxes) can have a label outside of themselves, which should focus the widget when clicked on, or when its mnemonic is pressed.
... get_accname: get the "name" of the iaccessible, for example the name of a button, check
box or menu item.
...And 10 more matches
XUL Events - Archive of obsolete content
the event handler should be placed on an observer.check
boxstatechangethe check
boxstatechange event is executed when the state of a <check
box> element has changed.closethe close event is executed when a request has been made to close the window when the user presses the close button.commandthe command event is executed when an element is activated.commandupdatethe commandupdate event is executed when a command update occurs on a <commandset>.
... attribute: onblur change this event is sent when the value of the text
box is changed.
...in a text
box, a user can normally hold down a key to repeat a character in this case, multiple sets of key events are sent (as if the user pressed the same key repeatedly).
...And 9 more matches
MenuItems - Archive of obsolete content
check
box menu items sometimes, you will want to have an item on a menu that acts as a toggle.
...to indicate the current state of the toolbar, a check
box would be displayed next to the menu item label.
... if the check
box is on, the toolbar is shown, whereas if the check
box is off, the toolbar is not shown.
...And 9 more matches
Special Condition Tests - Archive of obsolete content
for instance, if the container was a <v
box>, a rule could be created that would only match a <v
box> element.
...for the bookmarks toolbar, the outer content is inserted into an <h
box>, but at lower levels, the content will be inserted into a <menu> in case you aren't clear, the tag that must match for the outer iteration is the root element, the one with the datasources attribute on it.
...here is a previous example, rewritten to use the parent matching syntax: <v
box datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="*"/> <rule parent="v
box"> <action> <group
box uri="?"> <caption label="?name"/> </group
box> </action> </rule> <rule> <action> <label uri="?" value="?name"/> </action> </rule> </template> </v
box> 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 9 more matches
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
for example, a custom check
box might have a checked property which needs to be changed when the user clicks the check
box: <handlers> <handler event="mouseup" action="this.checked=!this.checked"/> </handlers> when the user clicks and releases the mouse button over the check
box, the mouseup event is sent to it, and the handler defined here is called, causing the state of the checked property to be reversed.
...the previous example could be extended so that the checked property of the check
box is changed when the space bar is pressed.
...the following alternate syntax can be used when the code in a handler is more complex: <binding id="binding-name"> <handlers> <handler event="event-name"> -- handler code goes here -- </handler> </handlers> </binding> handlers example the following example adds some key handlers to create a very primitive local clipboard: example 1 : source <binding id="clip
box"> <content> <xul:text
box/> </content> <implementation> <field name="clipboard"/> </implementation> <handlers> <handler event="keypress" key="x" modifiers="control" action="this.clipboard=document.getanonymousnodes(this)[0].value; document.getanonymousnodes(this)[0].value='';"/> <handler event="keypress" key="c" modifiers="control" action="this.clipboard=docum...
...And 9 more matches
button - Archive of obsolete content
when autocheck is true, the button type should be "check
box" or "radio".
...this means that the button acts like a check
box except that there is a third state which must be set manually by adjusting the check state.
...the type attribute must be set to check
box for buttons with a check state.
...And 9 more matches
menulist - Archive of obsolete content
attributes accesskey, crop, disableautoselect, disabled, editable, focused, image, label, oncommand, open, preference, readonly, sizetopopup, tabindex, value properties accessibletype, crop, description, disableautoselect, disabled, editable, editor, image, inputfield, itemcount, label, menu
boxobject, menupopup, open, selectedindex, selecteditem, tabindex, value methods appenditem, contains, getindexofitem, getitematindex, insertitemat, removeallitems, removeitemat, select examples <menulist> <menupopup> <menuitem label="option 1" value="1"/> <menuitem label="option 2" value="2"/> <menuitem label="option 3" value="3"/> <menuitem label="option 4" value="4"/> ...
...if the
box direction is reversed, the cropping is reversed.
...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 text
box.
...And 9 more matches
Basic native form controls - Learn web development
this article covers: the common input types button, check
box, file, hidden, image, password, radio, reset, submit, and text.
... they can have a placeholder; this is text that appears inside the text input
box that should be used to briefly describe the purpose of the
box.
... they can be constrained in size (the physical size of the
box) and maxlength (the maximum number of characters that can be entered into the
box).
...And 9 more matches
Implementing feature detection - Learn web development
a classic example might be to test for flex
box support in a browser; for browsers that support the newest flex
box spec, we could use a flexible and robust flex layout.
... when you save everything and try out your example, you should see the flex
box layout applied to the page if the browser supports modern flex
box, and the float layout if not.
... @supports also has or and not logic available — the other block applies the float layout if the flex
box 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.
...And 9 more matches
Strategies for carrying out testing - Learn web development
toggling the button should make the information
box appear/disappear.
... a grade: the information
box should animate smoothly as it appears/disappears.
... the gradient and text shadow should appear to enhance the look of the
box.
...And 9 more matches
Xray vision
as well as these two levels of privilege, chrome code can create sand
boxes.
... the security principal defined for the sand
box determines its privilege level.
... if an expanded principal is used, the sand
box is granted certain privileges over content code and is protected from direct access by content code.
...And 9 more matches
Drawing and Event Handling - Plugins
the plug-in prints the part of the page it occupies, and the browser handles the rest of the printing process, including displaying print dialog
boxes, getting the printer device context, and, of course, printing the rest of the page.
...the browser displays the necessary print dialog
boxes and calls npp_print again.
... a full-page plug-in handles the print dialog
boxes and printing process as it sees fit.
...And 9 more matches
GlobalEventHandlers.onanimationend - Web APIs
example html content <div class="main"> <div id="
box"> <div id="text">
box</div> </div> </div> <div class="button" id="play"> play animation </div> <pre id="log"></pre> css content :root { --
boxwidth:50px; } .main { width: 300px; height:300px; border: 1px solid black; } .button { cursor: pointer; width: 300px; border: 1px solid black; font-size: 16px; text-align: center; margin-top: 0; padding-top: 2px; paddin...
...olor: white; background-color: darkgreen; font: 14px "open sans", "arial", sans-serif; } #text { width: 46px; padding: 10px; position: relative; text-align: center; align-self: center; color: white; font: bold 1.4em "lucida grande", "open sans", sans-serif; } leaving out some bits of the css that don't matter for the discussion here, let's take a look at the styles for the
box that we're animating.
... first is the
box itself.
...And 9 more matches
GlobalEventHandlers.onanimationstart - Web APIs
example html content <div class="main"> <div id="
box"> <div id="text">
box</div> </div> </div> <div class="button" id="play"> play animation </div> <pre id="log"></pre> css content :root { --
boxwidth:50px; } .main { width: 300px; height:300px; border: 1px solid black; } .button { cursor: pointer; width: 300px; border: 1px solid black; font-size: 16px; text-align: center; margin-top: 0; padding-top: 2px; paddin...
...olor: white; background-color: darkgreen; font: 14px "open sans", "arial", sans-serif; } #text { width: 46px; padding: 10px; position: relative; text-align: center; align-self: center; color: white; font: bold 1.4em "lucida grande", "open sans", sans-serif; } leaving out some bits of the css that don't matter for the discussion here, let's take a look at the styles for the
box that we're animating.
... first is the
box itself.
...And 9 more matches
A simple RTCDataChannel sample - Web APIs
first, we have a couple of buttons for establishing and closing the connection: <button id="connectbutton" name="connectbutton" class="buttonleft"> connect </button> <button id="disconnectbutton" name="disconnectbutton" class="buttonright" disabled> disconnect </button> then there's a
box which contains the text input
box into which the user can type a message to transmit, with a button to send the entered text.
... <div class="message
box"> <label for="message">enter a message: <input type="text" name="message" id="message" placeholder="message text" inputmode="latin" size=60 maxlength=120 disabled> </label> <button id="sendbutton" name="sendbutton" class="buttonright" disabled> send </button> </div> finally, there's the little
box into which we'll insert the messages.
... <div class="message
box" id="receive
box"> <p>messages received:</p> </div> the javascript code while you can just look at the code itself on github, below we'll review the parts of the code that do the heavy lifting.
...And 9 more matches
filter - CSS: Cascading Style Sheets
</tr> </thead> <tbody> <tr> <td><img alt="test_form.jpg" id="img1" class="internal default" src="/files/3710/test_form_2.jpg" style="width: 100%;" /></td> <td><img alt="test_form.jpg" id="img2" class="internal default" src="/files/3710/test_form_2.jpg" style="width: 100%;" /></td> <td> <div class="svg-container"> <svg id="img3" overflow="visible" view
box="0 0 212 161" color-interpolation-filters="srgb"> <filter id="svgblur" x="-5%" y="-5%" width="110%" height="110%"> <fegaussianblur in="sourcegraphic" stddeviation="3.5"/> </filter> <image xlink:href="/files/3710/test_form_2.jpeg" filter="url(#svgblur)" width="212px" height="161px"/> </svg> </div> </td> <td><img alt="t...
...e</th> </tr> </thead> <tbody> <tr> <td><img alt="test_form.jpg" id="img1" class="internal default" src="/files/3708/test_form.jpg" style="width: 100%;" /></td> <td><img alt="test_form.jpg" id="img2" class="internal default" src="/files/3708/test_form.jpg" style="width: 100%;" /></td> <td><div class="svg-container"><svg xmlns="http://www.w3.org/2000/svg" id="img3" view
box="0 0 286 217" color-interpolation-filters="srgb"> <filter id="brightness"> <fecomponenttransfer> <fefuncr type="linear" slope="2"/> <fefuncg type="linear" slope="2"/> <fefuncb type="linear" slope="2"/> </fecomponenttransfer> </filter> <image xlink:href="/files/3708/test_form.jpg" filter="url(#brightness)" width="286px" height="217px" /> </svg><div></td> ...
...</tr> </thead> <tbody> <tr> <td><img alt="test_form_3.jpeg" id="img1" class="internal default" src="/files/3712/test_form_3.jpeg" style="width: 100%;" /></td> <td><img alt="test_form_3.jpg" id="img2" class="internal default" src="/files/3712/test_form_3.jpeg" style="width: 100%;" /></td> <td><div class="svg-container"><svg xmlns="http://www.w3.org/2000/svg" id="img3" view
box="0 0 240 151" color-interpolation-filters="srgb"> <filter id="contrast"> <fecomponenttransfer> <fefuncr type="linear" slope="2" intercept="-0.5"/> <fefuncg type="linear" slope="2" intercept="-0.5"/> <fefuncb type="linear" slope="2" intercept="-0.5"/> </fecomponenttransfer> </filter> <image xlink:href="/files/3712/test_form_3.jpeg" filter="url(#contrast)" width="240p...
...And 9 more matches
<input type="url"> - HTML: Hypertext Markup Language
a placeholder is a value that demonstrates the form the value should take by presenting an example of a valid value, which is displayed inside the edit
box when the element's value is "".
... once data is entered into the
box, the placeholder disappears; if the
box is emptied, the placeholder reappears.
... <input id="myurl" name="myurl" type="url" placeholder="http://www.example.com"> controlling the input size you can control not only the physical length of the input
box, but also the minimum and maximum lengths allowed for the input text itself.
...And 9 more matches
alignment-baseline - SVG: Scalable Vector Graphics
matches the
box’s corresponding baseline to that of its parent.
... text-bottom matches the bottom of the
box to the top of the parent’s content area.
... middle aligns the vertical midpoint of the
box with the baseline of the parent
box plus half the x-height of the parent.
...And 9 more matches
New Security Model for Web Services - Archive of obsolete content
securing resources from untrusted scripts behind firewalls introduction this page describes an alternative mechanism which can be used to protect all internal resources against requests from sand
boxed scripts.
...when an attempt is made to access a resource at a previously-unknown uri, the sand
box reads a file at that domain with declarations to determine whether access is permitted to the script.
... the problem external untrusted scripts loaded behind a firewall are executed in a sand
box.
...And 8 more matches
Things I've tried to do with XUL - Archive of obsolete content
(to add insult, xul layout code *explicitly* trims off '%' from width/height, thus treating it as pixels.) for reference, i'd like the following to give a v
box that resizes along with the window, with the green, red, and blue inside
boxes always maintaining a 30%-20%-50% ratio to the height of the parent v
box.
... <v
box flex="1"> <
box height="30%" flex="1" style="background: green;"/> <
box height="20%" flex="1" style="background: red;"/> <
box height="50%" flex="1" style="background: blue;"/> </v
box> workaround: no real good ones; the closest i've gotten is to use a div instead of a
box container: <html:div style="-moz-
box-flex: 1; width: 100%; height: 100%;"> <
box style="height: 30%" flex="1" style="background: green;"/> <
box style="height: 20%" flex="1" style="background: green;"/> <
box style="height: 50%" flex="1" style="background: green;"/> </html:div> using flex="3" flex="2" flex="5" would give the right display visually for the empty
boxes; however, flex only applies to how empty space is allocated.
... so, as soon as you add a label or some other element inside, there will be a different amount of "empty space" to allocate in different
boxes.
...And 8 more matches
Creating a Skin - Archive of obsolete content
window >
box { background-color: #0088cc; } menubar,menupopup,toolbar,tabpanels { background-color: lightblue; border-top: 1px solid white; border-bottom: 1px solid #666666; border-left: 1px solid white; border-right: 1px solid #666666; } caption { background-color: lightblue; } the inner
box of the window (which actually surrounds all of the window content) has been changed to have a me...
... the first rule above (for 'window >
box') specifies that the child
box of the window has a different color.
...that way, we can modify the xul without needing to keep the
box as the first child of the window.
...And 8 more matches
Stacks and Decks - Archive of obsolete content
containers each xul
box is a container that can contain any other element.
... there are a number of elements that are specialized types of
boxes, such as toolbars and tabbed panels.
... the
box tag creates the simplest
box with no special properties.
...And 8 more matches
XBL Attribute Inheritance - Archive of obsolete content
for example: xul: <search
box/> xbl: <binding id="searchbinding"> <content> <xul:text
box/> <xul:button label="search"/> </content> </binding> in the example, the label attribute has been placed directly on the button element.
...in this case, it would be preferable if the attribute could be specified on the search
box instead.
...<xul:text
box xbl:inherits="flex"/> <xul:button xbl:inherits="label"/> when the content is generated, the text
box grabs the flex attribute from the search
box and the button grabs the label attribute from the search
box.
...And 8 more matches
dialog - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element should be used in place of the window element for dialog
boxes.
... the buttons attribute may be used to set which buttons should appear in the dialog
box.
...etoalertposition examples <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?> <dialog id="donothing" title="dialog example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" buttons="accept,cancel" buttonlabelcancel="cancel" buttonlabelaccept="save"> <dialogheader title="options" description="my preferences"/> <group
box> <caption label="colour"/> <radiogroup> <radio label="red"/> <radio label="green" selected="true"/> <radio label="blue"/> </radiogroup> <label value="nickname"/> <text
box/> </group
box> </dialog> attributes activetitlebarcolor type: color string specify background color of the window's titlebar when it is active (foreground).
...And 8 more matches
WAI-ARIA basics - Learn web development
<nav>), or go beyond html5 semantics to provide signposts to different functional areas, e.g search, tabgroup, tab, list
box, etc.
...in these situations, aria can help to provide what's missing with a combination of roles like button, list
box, or tabgroup, and properties like aria-required or aria-posinset to provide further clues as to functionality.
...in this example we have a simple random quote
box: <section> <h1>random quote</h1> <blockquote> <p></p> </blockquote> </section> our javascript loads a json file via xmlhttprequest containing a series of random quotes and their authors.
...And 8 more matches
Other form controls - Learn web development
html has two forms of drop down content: the select
box, and the autocomplete
box.
... note: you can find examples of all the drop-down
box types on github at drop-down-content.html (see it live also).
... select
box a simple select
box is created with a <select> element with one or more <option> elements as its children, each of which specifies one of its possible values.
...And 8 more matches
From object to iframe — other embedding technologies - Learn web development
insert it into the input
box below, and see what the result is in the output.
... insert it into the input
box below, and see what the result is in the output.
...say you wanted to include the mdn glossary on one of your web pages — you could try something like this: <iframe src="https://udn.realityripple.com/docs/glossary" width="100%" height="500" frameborder="0" allowfullscreen sand
box> <p> <a href="https://udn.realityripple.com/docs/glossary"> fallback link for browsers that don't support iframes </a> </p> </iframe> this example includes the basic essentials needed to use an <iframe>: allowfullscreen if set, the <iframe> is able to be placed in fullscreen mode using the full screen api (somewhat beyond scope for this article.) frameborder if set to 1,...
...And 8 more matches
Beginning our React todo list - Learn web development
<span classname="visually-hidden"> tasks</span> </button> </div> <h2 id="list-heading"> 3 tasks remaining </h2> <ul role="list" classname="todo-list stack-large stack-exception" aria-labelledby="list-heading" > <li classname="todo stack-small"> <div classname="c-cb"> <input id="todo-0" type="check
box" defaultchecked={true} /> <label classname="todo-label" htmlfor="todo-0"> eat </label> </div> <div classname="btn-group"> <button type="button" classname="btn"> edit <span classname="visually-hidden">eat</span> </button> <button type="button" classname="btn btn__danger"> delet...
...e <span classname="visually-hidden">eat</span> </button> </div> </li> <li classname="todo stack-small"> <div classname="c-cb"> <input id="todo-1" type="check
box" /> <label classname="todo-label" htmlfor="todo-1"> sleep </label> </div> <div classname="btn-group"> <button type="button" classname="btn"> edit <span classname="visually-hidden">sleep</span> </button> <button type="button" classname="btn btn__danger"> delete <span classname="visually-hidden">sleep</span> </button> </div> </li> <li classname="todo stack-small"> <div classname="c-cb"> <input id="t...
...odo-2" type="check
box" /> <label classname="todo-label" htmlfor="todo-2"> repeat </label> </div> <div classname="btn-group"> <button type="button" classname="btn"> edit <span classname="visually-hidden">repeat</span> </button> <button type="button" classname="btn btn__danger"> delete <span classname="visually-hidden">repeat</span> </button> </div> </li> </ul> </div> ); } now open public/index.html and change the <title> element’s text to todomatic.
...And 8 more matches
Componentizing our Svelte app - Learn web development
some people prefer an intuitive approach and start looking at the markup and drawing
boxes around every component and subcomponent that seems to have its own logic.
... eventually, we will split up our app into the following components: alert.svelte: a general notification
box for communicating actions that have occurred.
... creating our todo component now we will create a todo component to encapsulate each individual todo — including the check
box and some editing logic so you can change an existing todo.
...And 8 more matches
Vue conditional rendering: editing existing todos - Learn web development
<template> <div class="stack-small"> <div class="custom-check
box"> <input type="check
box" class="check
box" :id="id" :checked="isdone" @change="$emit('check
box-changed')" /> <label :for="id" class="check
box-label">{{label}}</label> </div> <div class="btn-group"> <button type="button" class="btn" @click="toggletoitemeditform"> edit <span class="visually-hidden">{{label}}</span> </button> <button type="b...
...if isediting is true, we want to use that flag to display our todoitemeditform instead of the check
box.
...add this line at the top of your <script> element: import todoitemeditform from "./todoitemeditform"; and add a components property about the props property inside the component object: components: { todoitemeditform }, now, if you go to your app and click a todo item's "edit" button, you should see the check
box replaced with the edit form.
...And 8 more matches
Handling common HTML and CSS problems - Learn web development
in general, most core html and css functionality (such as basic html elements, css basic colors and text styling) works across most browsers you'll want to support; more problems are uncovered when you start wanting to use newer features such as flex
box, or html5 video/audio, or even more nascent, css grids or -webkit-background-clip: text.
... let's look at an example — a simple
box styled with css, which has some styling provided by various css3 features: note: you can also see this example running live on github as button-with-fallback.html (also see the source code).
... background-color: #ff0000; background-color: rgba(255,0,0,1);
box-shadow: inset 1px 1px 3px rgba(255,255,255,0.4), inset -1px -1px 3px rgba(0,0,0,0.4); } button:hover { background-color: rgba(255,0,0,0.5); } button:active {
box-shadow: inset 1px 1px 3px rgba(0,0,0,0.4), inset -1px -1px 3px rgba(255,255,255,0.4); } here we are providing an rgba background-color that changes opacity on hover to give the user a hint that the button is interactive, and some semi-transparent inset
box-shadow shades to give the button a bit of texture and depth.
...And 8 more matches
Gecko info for Windows accessibility vendors
contains more desktop-style widgets than html and follows a
box layout model, rather than being text-flow based.
...in addition, if it is a role_alert, a screen reader should treat it as a message
box -- that is, to read the entire contents.
... event_focus is fired for focus changes on any kind of focusable object event_statechange is used in check
boxes, radio buttons, text fields, combo
boxes and list
boxes.
...And 8 more matches
Index
31 components.utils.sand
box needsmarkupwork, reference, référence(2), xpcom:language bindings, xpconnect components.utils.sand
box is used to create a sand
box object for use with evalinsand
box().
... 34 components.utils.evalinsand
box add-ons, developing mozilla, extensions, javascript, xpcom:language bindings, xpconnect the evalinsand
box() function enables you to evaluate javascript code inside a sand
box you've previously created using the components.utils.sand
box constructor.
... 174 iaccessiblevalue interfaces, xpcom, xpcom interface reference the iaccessiblevalue interface represents a single numerical value and should be implemented by any class that supports numerical value like progress bars and spin
boxes.
...And 8 more matches
Examine and edit CSS - Firefox Developer Tools
enable/disable: if you hover over a declaration, a check
box appears next to it: you can use this to toggle the declaration on or off.
...(note that this setting is independent of the "browser styles" check
box in the computed view.) user-agent styles are displayed against a different background, and the link to the filename and line number contains the prefix (user agent): element {} rule the element {} rule at the top of the rules list isn't actually a css rule.
... filtering rules there's a
box at the top of the rules view labeled "filter styles": as you type: any rules which don't contain the typed string at all are hidden any declarations which contain the typed string are highlighted click the "x" at the end of the search
box to remove the filter.
...And 8 more matches
EffectTiming.fill - Web APIs
we have a <div> named "main" which is a container for the element we'll be animating, which is a <div> with the id "
box".
... <div class="main"> <div id="
box"> <div id="text">look!
... a
box!</div> </div> </div> <div class="button" id="animatebutton"> animate!
...And 8 more matches
GlobalEventHandlers.onanimationiteration - Web APIs
html <div class="main"> <div id="
box"> <div id="text">
box</div> </div> </div> <div class="button" id="play"> begin demonstration </div> css :root { --
boxwidth:50px; } .main { width: 300px; height:300px; border: 1px solid black; } .button { cursor: pointer; width: 300px; border: 1px solid black; font-size: 16px; text-align: center; margin-top: 0; padding-top: 2px; padding-bottom: 4px; color: w...
...hite; background-color: darkgreen; font: 14px "open sans", "arial", sans-serif; } #text { width: 46px; padding: 10px; position: relative; text-align: center; align-self: center; color: white; font: bold 1.4em "lucida grande", "open sans", sans-serif; } leaving out some bits of the css that don't matter for the discussion here, let's take a look at the styles for the
box that we're animating.
... first is the
box itself.
...And 8 more matches
Storage API - Web APIs
origin 2 has no data stored in it yet; it's just an empty
box waiting for content.
...
box modes the actual data storage within each site storage unit is called its
box.
... each site storage unit has exactly one
box into which all of its data is placed, and has a
box mode that describes the data retention policy for that
box.
...And 8 more matches
Border-radius generator - CSS: Cascading Style Sheets
<div class="ui-input-slider" data-topic="height" data-info="height" data-unit=" px" data-min="75" data-max="350" data-sensivity="1"></div> </div> <div id="output"></div> </div> <div class="group section"> <div id="radius-lock"> <div class="info"> rounded corner </div> <div class="ui-check
box" data-topic='top-left'></div> <div class="ui-check
box" data-topic='top-right'></div> <div class="ui-check
box" data-topic='bottom-right'></div> <div class="ui-check
box" data-topic='bottom-left'></div> </div> <div id="unit-selection"> <div class="info"> select border units </div> </div> </di...
...nd lower */ /* * ui component */ .ui-input-slider-container { height: 20px; margin: 10px 0; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input-slider-container * { float: left; height: 100%; line-height: 100%; } /* input slider */ .ui-input-slider > input { margin: 0; padding: 0; width: 50px; text-align: center; -moz-
box-sizing: border-
box; -webkit-
box-sizing: border-
box;
box-sizing: border-
box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px; text-align: right; text-transform: lowercase; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("https://mdn.mozillademos.org/files/5679/arrows.png") center left no-repeat; } .ui-input-slider-right {...
...at; } .ui-input-slider-name { width: 90px; padding: 0 10px 0 0; text-align: right; text-transform: lowercase; } .ui-input-slider-btn-set { width: 25px; background-color: #2c9fc9; border-radius: 5px; color: #fff; font-weight: bold; line-height: 14px; text-align: center; } .ui-input-slider-btn-set:hover { background-color: #379b4a; cursor: pointer; } /* * ui component */ /* check
box */ .ui-check
box { text-align: center; font-size: 16px; font-family: "segoe ui", arial, helvetica, sans-serif; line-height: 1.5em; color: #fff; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .ui-check
box > input { display: none; } .ui-check
box > label { font-size: 12px; padding: 0.333em 1.666em 0.5em; height: 1em; line-height: 1em;...
...And 8 more matches
Mastering Wrapping of Flex Items - CSS: Cascading Style Sheets
flex
box was designed as a single dimensional layout, meaning that it deals with laying out items as a row or as a column — but not both at once.
...in this guide i will explain how this works, what it is designed for and what situations really require css grid layout rather than flex
box.
... there is no method in flex
box to tell items in one row to line up with items in the row above — each flex line acts like a new flex container.
...And 8 more matches
Inline formatting context - CSS: Cascading Style Sheets
inline
boxes are laid out one after the other, in the direction sentences run in the writing mode in use: in a horizontal writing mode,
boxes are laid out horizontally, starting on the left.
...the
boxes in the horizontal writing mode run horizontally, and the vertical writing mode
boxes run vertically.
...
boxes forming a line are contained by a rectangular area called a line
box.
...And 8 more matches
align-self - CSS: Cascading Style Sheets
in flex
box, it aligns the item on the cross axis.
... the property doesn't apply to block-level
boxes, or to table cells.
... if a flex
box item's cross-axis margin is auto, then align-self is ignored.
...And 8 more matches
justify-items - CSS: Cascading Style Sheets
the css justify-items property defines the default justify-self for all items of the
box, giving them all a default way of justifying each
box along the appropriate axis.
... in table cell layouts, this property is ignored (more about alignment in block, absolute positioned and table layout) in flex
box layouts, this property is ignored (more about alignment in flex
box) in grid layouts, it aligns the items inside their grid areas on the inline axis (more about alignment in grid layouts) syntax /* basic keywords */ justify-items: auto; justify-items: normal; justify-items: stretch; /* positional alignment */ justify-items: center; /* pack items around the center */ justify-items: start; ...
...note that justify-items is ignored in flex
box layouts.
...And 8 more matches
justify-self - CSS: Cascading Style Sheets
the css justify-self property sets the way a
box is justified inside its alignment container along the appropriate axis.
... in table cell layouts, this property is ignored (more about alignment in block, absolute positioned and table layout) in flex
box layouts, this property is ignored (more about alignment in flex
box) in grid layouts, it aligns an item inside its grid area on the inline axis (more about alignment in grid layouts) syntax /* basic keywords */ justify-self: auto; justify-self: normal; justify-self: stretch; /* positional alignment */ justify-self: center; /* pack item around the center */ justify-self: start; /* pac...
...note that justify-self is ignored in flex
box layouts.
...And 8 more matches
gradientUnits - SVG: Scalable Vector Graphics
value userspaceonuse | objectbounding
box default value objectbounding
box animatable yes userspaceonuse this value indicates that the attributes represent values in the coordinate system that results from taking the current user coordinate system in place at the time when the gradient element is referenced (i.e., the user coordinate system for the element referencing the gradient element via a fill or stroke property) and then applyi...
... objectbounding
box this value indicates that the user coordinate system for the attributes is established using the bounding
box of the element to which the gradient is applied and then applying the transform specified by attribute gradienttransform.
... percentages represent values relative to the bounding
box for the object.
...And 8 more matches
Security best practices in extensions - Archive of obsolete content
one of the best ways to do this is to use components.utils.evalinsand
box().
... note that objects passed into the sand
box are restricted, but objects that come back out from it are not.
...for more information, refer to the evalinsand
box section.
...And 7 more matches
Block and Line Layout Cheat Sheet - Archive of obsolete content
ns_frame_sync_frame_and_view ns_frame_outside_children this flag is set if the combined area of a frame's children extend past the frame's bounding
box.
... (what is a frame's "bounding
box"?) if this flag is set, then <code>moverflowarea</code> will contain the total area of the frame, including the overflow.
... nsline
box a block consists of lines and other blocks, stacked vertically.
...And 7 more matches
pack - Archive of obsolete content
« xul reference home pack type: one of the values below the pack attribute specifies where child elements of the
box are placed when the
box is larger that the size of the children.
... for
boxes with horizontal orientation, it is used to indicate the position of children horizontally.
... for
boxes with vertical orientation, it is used to indicate the position of children vertically.
...And 7 more matches
treecol.type - Archive of obsolete content
check
box the content of the columns are check
boxes.
... if you are using type="check
box", then the tree and each treecol must be editable.
... you need to apply css to make the check
box toggle.
...And 7 more matches
Grids - Archive of obsolete content
if you wanted one particular cell to contain multiple elements, you can use a nested h
box or other
box element.
... an h
box is a single element but you can put as many elements that you want inside it.
... for example: example 2 : source view <grid flex="1"> <columns> <column/> <column flex="1"/> </columns> <rows> <row> <label control="doctitle" value="document title:"/> <text
box id="doctitle" flex="1"/> </row> <row> <label control="docpath" value="path:"/> <h
box flex="1"> <text
box id="docpath" flex="1"/> <button label="browse..."/> </h
box> </row> </rows> </grid> notice in the image how the first column of elements containing the labels has only a single element in each row.
...And 7 more matches
XBL Example - Archive of obsolete content
example 1 : source <binding id="slideshow"> <content> <xul:v
box flex="1"> <xul:deck xbl:inherits="selectedindex" selectedindex="0" flex="1"> <children/> </xul:deck> <xul:h
box> <xul:button xbl:inherits="label=previoustext"/> <xul:label flex="1"/> <xul:button xbl:inherits="label=nexttext"/> </xul:h
box> </xul:v
box> </content> </binding> this binding creates the slideshow structure that we want.
... <
box class="slideshow" previoustext="previous" nexttext="next" flex="1"> <button label="button 1"/> <check
box label="check
box 2"/> <text
box/> </
box> the style sheet used here is: .slideshow { -moz-binding: url("slideshow.xml#slideshow"); } the first button, button 1 has been used as the first page of the deck.
...this returns the vertical
box, so to get the deck, we need to get the first child node of the
box.
...And 7 more matches
XBL Inheritance - Archive of obsolete content
for example, the following binding creates a text
box which adds the text 'http://www' to the beginning of its value when the f4 key is pressed.
... example 1 : source <binding id="text
boxwithhttp" extends="chrome://global/content/bindings/text
box.xml#text
box"> <handlers> <handler event="keypress" keycode="vk_f4"> this.value="http://www"+value; </handler> </handlers> </binding> the xbl here extends from the xul text
box element.
... the url given in the extends attribute above is the url of the text
box binding.
...And 7 more matches
Accessibility/XUL Accessibility Reference - Archive of obsolete content
caption see group
box check
box <check
box label='<!--label text-->' /> colorpicker <colorpicker type="button" palettename="standard" /> colorpicker appears to read color values out if the colorpicker can get focus in the first place.
... group
box <group
box> <caption label="<!--group label-->" /> <h
box> <button label="<!--button text-->" /> </h
box> </group
box> iframe jaws 7.10 issues testing with jaws 7.10, use of an iframe element causes many, unpredictable issues with xul inside of the iframe.
... image <image src="images/img.xbm" tooltiptext='<!--image label-->'/> key see keyboard shortcut tutorial keyset see keyboard shortcut tutorial list
box <label control='listid'><!--label text--></label> <list
box id="listid"> <listitem value="val" label="<!--item text-->"/> </list
box> <label control='listid2' value='<!--list label-->' /> <list
box rows="5" id='listid2'> <listcols> <listcol/> <listcol/> <listcol/> </listcols> <listhead> <listheader label="name" /> <listheader label="sex" /> <listheader label="color" /> </listhead> <listitem> <label value="<!--pearl-->" /> <label value="<!--female-->" /...
...And 7 more matches
toolbar - Archive of obsolete content
it is a type of
box that defaults to horizontal orientation.
... it can be collapsed with a grippy when the toolbar is placed inside a tool
box.
...these are toolbars that are not children of a tool
box element.
...And 7 more matches
Building up a basic demo with Babylon.js - Game development
let's start by defining the geometry for a
box shape — add the following new code below your previous additions: var
box = babylon.mesh.create
box("
box", 2, scene); a mesh is a way the engine creates geometric shapes, so material can be easily applied to them later on.
... in this case we're creating a
box using the mesh.create
box method with it's own name, a size of 2, and a declaration of which scene we want it added to.
...for the
box size) are unitless, and can basically be anything you deem suitable for your scene — milimeters, meters, feet, or miles — it's up to you.
...And 7 more matches
Handling different text directions - Learn web development
we create borders on the top, right, bottom, and left of a
box, for example.
...in this next example i have two
boxes that contain a heading and a paragraph.
... let's take a look at our two
boxes again — one with a horizontal-tb writing mode and one with vertical-rl.
...And 7 more matches
Test your skills: sizing - Learn web development
task one in this task, you have two
boxes.
...test this
box by removing the content from the html to make sure you still get a 100 pixel tall
box even with no content.
... the second
box should be fixed at 100 pixels tall, so that content will overflow if there is too much.
...And 7 more matches
Basic math in JavaScript — numbers and operators - Learn web development
active learning: sizing a canvas
box in this exercise, you will manipulate some numbers and operators to change the size of a
box.
... the
box is drawn using a browser api called the canvas api.
...the width and height of the
box (in pixels) are defined by the variables x and y, which are initially both given a value of 50.
...And 7 more matches
Styling Vue components with CSS - Learn web development
add the following contents to the reset.css file: /*reset.css*/ /* resets */ *, *::before, *::after {
box-sizing: border-
box; } *:focus { outline: 3px dashed #228bec; } html { font: 62.5% / 1.15 sans-serif; } h1, h2 { margin-bottom: 0; } ul { list-style: none; padding: 0; } button { border: none; margin: 0; padding: 0; width: auto; overflow: visible; background: transparent; color: inherit; font: inherit; line-height: normal; -webkit-font-smoothing: inherit; -moz-osx-f...
... margin-bottom: 0; } .stack-small > * + * { margin-top: 1.25rem; } .stack-large > * + * { margin-top: 2.5rem; } @media screen and (min-width: 550px) { .stack-small > * + * { margin-top: 1.4rem; } .stack-large > * + * { margin-top: 2.8rem; } } /* end global styles */ #app { background: #fff; margin: 2rem 0 4rem 0; padding: 1rem; padding-top: 0; position: relative;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.2), 0 2.5rem 5rem 0 rgba(0, 0, 0, 0.1); } @media screen and (min-width: 550px) { #app { padding: 4rem; } } #app > * { max-width: 50rem; margin-left: auto; margin-right: auto; } #app > form { max-width: 100%; } #app h1 { display: block; min-width: 100%; width: 100%; text-align: center; margin: 0; margin-bottom: 1rem; } </style> if yo...
... to use the scoped modifier, create a <style> element inside todoitem.vue, at the bottom of the file, and give it a scoped attribute: <style scoped> </style> next, copy the following css into the newly created <style> element: .custom-check
box > .check
box-label { font-family: arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-weight: 400; font-size: 16px; font-size: 1rem; line-height: 1.25; color: #0b0c0c; display: block; margin-bottom: 5px; } .custom-check
box > .check
box { font-family: arial, sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing...
...And 7 more matches
How to implement a custom autocomplete search component
the xul text
box element supports an autocomplete mechanism that is used to create a text
box with a popup containing a list of possible completions for what the user has started to type.
... to use autocomplete with a xul text
box, all you need to do is set some attributes: <text
box type="autocomplete" autocompletesearch="history"/> the type="autocomplete" turns on the autocomplete mechanism and the autocompletesearch="history" sets the source for the autocomplete.
... there are more options and features, see xul:text
box_(firefox_autocomplete) for more details.
...And 7 more matches
JSAPI User Guide
one way to keep user a from accessing user b's sensitive data or dangerous functions is to keep each user's code in a separate sand
box.
...how can a malicious script get a reference to an object from another sand
box?
...even global variables are per-sand
box.
...And 7 more matches
IAccessibleText
characterextents() returns the bounding
box of the specified position.
...because it does not represent an existing character its bounding
box is defined in relation to preceding characters.
... it should be roughly equivalent to the bounding
box of some character when inserted at the end of the text().
...And 7 more matches
nsIDOMClientRect
dom/interfaces/base/nsidomclientrect.idlscriptable represents a rectangular
box.
... the type of
box is specified by the method that returns such an object.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) attributes attribute type description bottom float y-coordinate, relative to the viewport origin, of the bottom of the rectangle
box.
...And 7 more matches
nsIXPConnect
void clearallwrappednativesecuritypolicies(); nsixpconnectjsobjectholder createsand
box(in jscontextptr cx, in nsiprincipal principal); native code only!
... void debugdumpjsstack(in prbool showargs, in prbool showlocals, in prbool showthisprops); void debugdumpobject(in nsisupports acomobj, in short depth); [noscript,notxpcom] prbool definedomquickstubs(in jscontextptr cx, in jsobjectptr proto, in pruint32 flags, in pruint32 interfacecount, [array, size_is(interfacecount)] in nsiidptr interfacearray); jsval evalinsand
boxobject(in astring source, in jscontextptr cx, in nsixpconnectjsobjectholder sand
box, in prbool returnstringonly); native code only!
... exceptions thrown missing exception missing description native code only!createsand
box create a sand
box for evaluating code in isolation using evalinsand
boxobject().
...And 7 more matches
Tutorial: Set a breakpoint - Firefox Developer Tools
since the debugger api is only available to privileged javascript code, you’ll need to use the browser content tool
box to try it out.
... to do this, open the firefox developer tools, click on the options gear at the upper right of the tool
box, and make sure that both “enable browser chrome and add-on debugging tool
boxes” and “enable remote debugging” are checked.
... save the following text to an html file: <div onclick="report('the best div');">click me!</div> <div onclick="report('another great div');">or me!</div> <script> function report(what) { console.log('clicked: ' + what); } </script> visit the html file in your browser, and open the browser content tool
box by opening the firefox menu, choosing “web developer”, and then “browser content tool
box”.
...And 7 more matches
All keyboard shortcuts - Firefox Developer Tools
the first section lists the shortcut for opening each tool and the second section lists shortcuts that are applicable to the tool
box itself.
...the same shortcuts will work to close tools hosted in the tool
box, if the tool is active.
... command windows macos linux open tool
box (with the most recent tool activated) ctrl + shift + i cmd + opt + i ctrl + shift + i bring tool
box to foreground (if the tool
box is in a separate window and not in foreground) ctrl + shift + i or f12 cmd + opt + i or f12 ctrl + shift + i or f12 close tool
box (if the tool
box is in a separate window and in foreground) ctrl + shift + i or f12 cmd + opt + i or f12 ctrl + shift + i or f12 open web console 1 ctrl + shift + k cmd + opt + k ctrl + shift + k toggle "pick an element from the page" (opens the tool
box and/or focus the inspector tab) ctr...
...And 7 more matches
Element.getClientRects() - Web APIs
the getclientrects() method of the element interface returns a collection of domrect objects that indicate the bounding rectangles for each css border
box in a client.
... syntax let rectcollection = object.getclientrects(); return value the returned value is a collection of domrect objects, one for each css border
box associated with the element.
... each domrect object contains read-only left, top, right and bottom properties describing the border
box, in pixels, with the top-left relative to the top-left of the viewport.
...And 7 more matches
Capabilities, constraints, and settings - Web APIs
edit the constraint sets for the video and audio tracks in the edit
boxes on the left, then click the "apply constraints" button to try them out.
... the actual settings the browser selected and is using are shown in the
boxes on the right.
... videoconstrainteditor.value = videodefaultconstraintstring; audioconstrainteditor.value = audiodefaultconstraintstring; updating the settings display to the right of each of the constraint set editors is a second text
box which we use to display the current configuration of the track's configurable properties.
...And 7 more matches
CSS Animations tips and tricks - CSS: Cascading Style Sheets
<div class="
box"> </div> <div class="runbutton">click me to run the animation</div> css content now we'll define the animation itself using css.
... .runbutton { cursor: pointer; width: 300px; border: 1px solid black; font-size: 16px; text-align: center; margin-top: 12px; padding-top: 2px; padding-bottom: 4px; color: white; background-color: darkgreen; font: 14px "open sans", "arial", sans-serif; } @keyframes colorchange { 0% { background: yellow } 100% { background: blue } } .
box { width: 100px; height: 100px; border: 1px solid black; } .changing { animation: colorchange 2s; } there are two classes here.
... the "
box" class is the basic description of the
box's appearance, without any animation information included.
...And 7 more matches
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
* {
box-sizing: border-
box;} .wrapper { max-width: 1024px; margin: 0 auto; font: 1.2em helvetica, arial, sans-serif; } .wrapper > * { border: 2px solid #f08c00; background-color: #ffec99; border-radius: 5px; padding: 10px; } nav ul { list-style: none; margin: 0; padding: 0; } <div class="wrapper"...
...i’m using a flex
box on the navigation to display it in a row spaced out.
...i then use a flex
box to display the navigation as a column.
...And 7 more matches
<color> - CSS: Cascading Style Sheets
captiontext text in caption, size
box, and scrollbar arrow
box.
... mozilla system color extensions -moz-buttondefault the border color that goes around buttons that represent the default action for a dialog
box.
... -moz-combo
box background color for combo-
boxes.
...And 7 more matches
<input type="tel"> - HTML: Hypertext Markup Language
a placeholder is a value that demonstrates the form the value should take by presenting an example of a valid value, which is displayed inside the edit
box when the element's value is "".
... once data is entered into the
box, the placeholder disappears; if the
box is emptied, the placeholder reappears.
... <input id="telno" name="telno" type="tel" placeholder="123-4567-8901"> controlling the input size you can control not only the physical length of the input
box, but also the minimum and maximum lengths allowed for the input text itself.
...And 7 more matches
Browser detection using the user agent - HTTP
this effect can be easily achieved using css flex
boxes, sometimes with floats as a partial fallback.
...let us imagine a page composed of
boxes of information; each
box is about a different feline breed or canine breed.
... each
box has an image, an overview, and a historical funfact.
...And 7 more matches
Content Processes - Archive of obsolete content
as explained earlier, firefox doesn't yet use separate processes for tabs or add-ons, so instead, each content script is loaded in a sand
box.
... sand
boxes were explained this article.
... accessing the dom the global for the content sand
box has the window object as its prototype.
...And 6 more matches
/loader - Archive of obsolete content
secure each module in an isolated js sand
box and makes any capability imports explicit via calls to the require() function.
... globals each module loaded via the loader instance is secured in own js sand
box.
... load() the load() function takes loader and loads the given module into it: let loader = loader(options); let module = module('foo/bar', 'resource:///modules/foo/bar.js'); load(loader, module); sand
box() the sand
box() function is a utility function for creating js sand
boxes.
...And 6 more matches
Adding windows and dialogs - Archive of obsolete content
the prompt service has a very rich set of functions that allow different kinds of inputs, such as text, passwords, usernames and passwords, and check
boxes that can be used for "never ask this again"-type dialogs.
... group
boxes the group
box element should be easy to understand: it groups a series of xul controls together.
... it's a
box container with styling that is usually a visible border around its contents, so that it's clear what is being grouped together.
...And 6 more matches
CSS3 - Archive of obsolete content
it brings a lot of long-awaited novelties, like rounded corners, shadows, gradients, transitions or animations, as well as new layouts like multi-columns, flexible
box or grid layouts.
... css basic user interface module level 3 recommendation since june 21st, 2018 adds: the ability to tweak the
box model using the css
box-sizing property.
... at risk: due to insufficient browser support, standardization of the padding-
box value may be postponed to the next iteration of this module.
...And 6 more matches
Tamarin Build System Documentation - Archive of obsolete content
tamarin-redux mercurial builds are displayed in the top 3 sections: compile, smoke, test sand
box builds are displayed in next 3 sections: sand
box compile, sand
box smoke, sand
box test tamarin-central is considered a "sand
box" and will appear under sand
box phase what are the build phases?
... the compile phase compiles all of the tamarin source code and builds all of the shell executables, any errors will stop the phase and a red
box will appear on the slave where the error occurred.
... checkins (hg push) to http://hg.mozilla.org/tamarin-redux and sand
box requests will trigger a buildbot build when all build slaves are idle the next build begins before the build begins buildbot waits for 2 minutes of no checkin activity the build system prioritizes tamarin-redux checkins over sand
box builds when several tamarin-redux checkins occur the newest change is built including all checkins since the last build each sand
box build occurs in the order they we...
...And 6 more matches
Using Recursive Templates - Archive of obsolete content
<group
box type="menu" datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="*"/> <action> <v
box uri="?" class="indent"> <label value="?name"/> </v
box> </action> </template> </group
box> in this simplified example, the xpath expression just gets the list of child elements of the reference node.
... for the outermost iteration, a v
box is created with a child label.
...the content of the action body is again generated for each result, but instead of being inserted inside the outermost group
box, this new content is inserted inside the content generated from the previous iteration.
...And 6 more matches
Anonymous Content - Archive of obsolete content
filename input field example another example, this time for a field for entering a filename: <binding id="fileentry"> <content> <text
box/> <button label="browse..."/> </content> </binding> attaching this binding to an element will cause it to contain a field for entering text, followed by a browse button.
...for example, a simplified version of an editable menulist element, might be created as follows: xul: <menu class="drop
box"> <menupopup> <menuitem label="1000"/> <menuitem label="2000"/> </menupopup> </menu> css: menu.drop
box { -moz-binding: url('chrome://example/skin/example.xml#drop
box'); } xbl: <binding id="drop
box"> <content> <children/> <xul:text
box flex="1"/> <xul:button src="chrome://global/skin/images/drop
box.jpg"/> </content> </binding> this example creates an input fiel...
...the resulting content would be: <menu class="drop
box"> <menupopup> <menuitem label="1000"/> <menuitem label="2000"/> </menupopup> <text
box flex="1"/> <button src="chrome://global/skin/images/drop
box.jpg"/> </menu> includes attribute in some cases, you may wish to only include specific types of content and not others.
...And 6 more matches
Introduction to XBL - Archive of obsolete content
the basic appearance of all elements, such as scroll bars and check
boxes may be modified by adjusting the style or by setting attributes on the element.
... binding example the
box is generic enough that you can use it to create custom widgets (although you can use any element, even one you make up yourself).
... by assigning a class to a
box tag, you can associate a binding to only those
boxes that belong to that class.
...And 6 more matches
More Event Handlers - Archive of obsolete content
in the example below, currenttarget is always the v
box, whereas target would be the specific element, either the button or check
box, that was activated.
... example 1 : source view <v
box oncommand="alert(event.currenttarget.tagname);"> <button label="ok"/> <check
box label="show images"/> </v
box> stop event propagation once you handle an event, regardless of where in the propagation the event is, you will likely want to stop the event from being sent to further elements, essentially stopping the capturing or bubbling phases from continuing.
...example 2 : source view <h
box id="outer
box"> <button id="okbutton" label="ok"/> </h
box> <script> function buttonpressed(event){ alert('button was pressed!'); } function
boxpressed(event){ alert('
box was pressed!'); event.stoppropagation(); } var button = document.getelementbyid("okbutton"); button.addeventlistener('command',buttonpressed,true); var outer
box = document.getelementbyid("outer
box"); outer
box.addeventl...
...And 6 more matches
More Menu Features - Archive of obsolete content
the example below creates a simple submenu inside the file menu example 1 : source view <tool
box flex="1"> <menubar id="sample-menubar"> <menu id="file-menu" label="file"> <menupopup id="file-popup"> <menu id="new-menu" label="new"> <menupopup id="new-popup"> <menuitem label="window"/> <menuitem label="message"/> </menupopup> </menu> <menuitem label="open"/> <menuitem label="save"/> <menuseparator...
.../> <menuitem label="exit"/> </menupopup> </menu> </menubar> </tool
box> adding a menu to our find files example let's add a menu to the find files dialog.
... <tool
box> <menubar id="findfiles-menubar"> <menu id="file-menu" label="file" accesskey="f"> <menupopup id="file-popup"> <menuitem label="open search..." accesskey="o"/> <menuitem label="save search..." accesskey="s"/> <menuseparator/> <menuitem label="close" accesskey="c"/> </menupopup> </menu> <menu id="edit-menu" label="edit" accesskey="e"> <menupopup id="edit-popup"> <menuitem label="cut" accesskey="t"/> <menuitem label="copy" accesskey="c"/> <menuitem label="paste" accesskey="p" disabled="true"/> </menupopup> </menu> </menubar> <toolbar id="findfiles-toolbar> here we have added two menus with various...
...And 6 more matches
Simple Menu Bars - Archive of obsolete content
the menu bar can optionally be placed inside a tool
box and the menu would work just like any other toolbar.
... menupopup the popup
box that appears when you click on the menu title.
... this
box contains the list of menu commands.
...And 6 more matches
listitem - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a single row in a list
box.
... attributes accesskey, checked, command, crop, current, disabled, image, label, preference, selected, tabindex, type, value properties accesskey, accessible, checked, control, crop, current, disabled, image, label, selected, tabindex, value style classes listitem-iconic examples <list
box id="thelist"> <listitem label="ruby"/> <listitem label="emerald"/> <listitem label="sapphire" selected="true"/> <listitem label="diamond"/> </list
box> attributes accesskey type: character this should be set to a character that is used as a shortcut key.
... for buttons, the type attribute must be set to check
box or radio for this attribute to have any effect.
...And 6 more matches
Building up a basic demo with the PlayCanvas engine - Game development
note: an entity is any object used in the scene — it can be an object like a
box, cylinder or cone, but it can also be a camera, light or sound source.
...let's start by defining the geometry for a cube shape — add the following new code below your previous additions: var
box = new pc.entity();
box.addcomponent("model", { type: "
box" }); app.root.addchild(
box);
box.rotate(10, 15, 0); it will create an entity with the
box model component and add it to the root of the application, our scene.
... we also rotate the
box a bit to show that it's actually a 3d cube and not a square.
...And 6 more matches
Starting our Svelte Todo list app - Learn web development
</button> <button class="btn btn__primary todo-edit" type="submit"> save <span class="visually-hidden">new name for create a svelte starter app</span> </button> </div> </form> </div> </li> <!-- todo-2 --> <li class="todo"> <div class="stack-small"> <div class="c-cb"> <input type="check
box" id="todo-2" checked/> <label for="todo-2" class="todo-label"> create your first component </label> </div> <div class="btn-group"> <button type="button" class="btn"> edit <span class="visually-hidden">create your first component</span> </button> <button type="button" class="btn btn__danger"> ...
... delete <span class="visually-hidden">create your first component</span> </button> </div> </div> </li> <!-- todo-3 --> <li class="todo"> <div class="stack-small"> <div class="c-cb"> <input type="check
box" id="todo-3" /> <label for="todo-3" class="todo-label"> complete the rest of the tutorial </label> </div> <div class="btn-group"> <button type="button" class="btn"> edit <span class="visually-hidden">complete the rest of the tutorial</span> </button> <button type="button" class="btn btn__danger"> delete <span class="visually-hidden">complete the rest of the tutorial</span> </butto...
...but let's have a look at the markup and see how it relates to our desired features: a label and a text
box for entering new tasks.
...And 6 more matches
Gecko Roles
role_dialog represents a dialog
box or message
box.
... role_list represents a list
box, allowing the user to select one or more items.
... role_statictext represents read-only text, such as labels for other controls or instructions in a dialog
box.
...And 6 more matches
nsIAccessibleProvider
xul controls constants constant value description xulalert 0x00001001 xulbutton 0x00001002 xulcheck
box 0x00001003 xulcolorpicker 0x00001004 xulcolorpickertile 0x00001005 xulcombo
box 0x00001006 xuldropmarker 0x00001007 xulgroup
box 0x00001008 xulimage 0x00001009 xullink 0x0000100a xullist
box 0x0000100b xullistcell 0x00001026 xullisthead 0x00001024 xullistheader 0x00001025 xullistitem 0x0000100c xulmenubar 0x0000100d xulmenuitem 0x0000100e x...
... xultab
box 0x00001018 a combination of a tabs object and a tabpanels object.
... xultabs 0x00001019 the collection of tab objects, usable in the tab
box and independent of as well.
...And 6 more matches
Index - Firefox Developer Tools
15 browser tool
box debug, firefox, javascript the browser tool
box enables you to debug add-ons and the browser's own javascript code rather than just web pages like the normal tool
box.
... the browser tool
box's context is the whole browser rather than just single page on a single tab.
...to enable it, open the developer tool settings, and check the "memory"
box under "default firefox developer tools": 40 dom allocation example this article describes a very simple web page that we'll use to illustrate some features of the memory tool.
...And 6 more matches
GlobalEventHandlers.onanimationcancel - Web APIs
example html <div class="main"> <div id="
box" onanimationcancel="handlecancelevent(event);"> <div id="text">
box</div> </div> </div> <div class="button" id="toggle
box"> hide the
box </div> <pre id="log"></pre> css :root { --
boxwidth: 50px; } .main { width: 300px; height: 300px; border: 1px solid black; } .button { cursor: pointer; width: 300px; border: 1px solid black; font-size: 16px; text-align: center; m...
... color: white; background-color: darkgreen; font: 14px "open sans", "arial", sans-serif; } #text { width: 46px; padding: 10px; position: relative; text-align: center; align-self: center; color: white; font: bold 1.4em "lucida grande", "open sans", sans-serif; } leaving out some bits of the css that don't matter for the discussion here, let's take a look at the styles for the
box that we're animating.
... first is the
box itself, with all its properties, including animation, defined.
...And 6 more matches
SubtleCrypto.sign() - Web APIs
rsassa-pkcs1-v1_5 this code fetches the contents of a text
box, encodes it for signing, and signs it with a private key.
... /* fetch the contents of the "message" text
box, and encode it in a form we can use for the sign operation.
... */ function getmessageencoding() { const message
box = document.queryselector(".rsassa-pkcs1 #message"); let message = message
box.value; let enc = new textencoder(); return enc.encode(message); } let encoded = getmessageencoding(); let signature = await window.crypto.subtle.sign( "rsassa-pkcs1-v1_5", privatekey, encoded ); rsa-pss this code fetches the contents of a text
box, encodes it for signing, and signs it with a private key.
...And 6 more matches
WebGLRenderingContext.scissor() - Web APIs
the webglrenderingcontext.scissor() method of the webgl api sets a scissor
box, which limits the drawing to a specified rectangle.
... syntax void gl.scissor(x, y, width, height); parameters x a glint specifying the horizontal coordinate for the lower left corner of the
box.
... y a glint specifying the vertical coordinate for the lower left corner of the
box.
...And 6 more matches
Flow Layout and Overflow - CSS: Cascading Style Sheets
giving an element a fixed height and width, then adding significant content to the
box, creates a basic overflow example: the content goes into the
box.
... once it fills the
box, it continues to overflow in a visible way, displaying content outside the
box, potentially displaying under subsequent content.
... using a value of scroll contains the content in its
box and add scrollbars to enable viewing it.
...And 6 more matches
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
* {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; 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> ...
...to cause all created rows to be 100 pixels tall for example you would use: * {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> .
... * {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four <br>this cell <br>has extra <br>content.
...And 6 more matches
CSS Grid Layout and Accessibility - CSS: Cascading Style Sheets
visual not logical re-ordering any time you reorder things with grid layout – or with flex
box – you only perform visual reordering.
... in this example i have used grid to lay out a set of
boxes that contain links.
... i have used the line-based placement properties to position
box 1 on the second row of the grid.
...And 6 more matches
CSS Grid Layout and Progressive Enhancement - CSS: Cascading Style Sheets
the float no longer applies, and i can use the css
box alignment property align-self to align my content to the end of the container: * {
box-sizing: border-
box;} img { max-width: 100%; display: block; } .media { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; max-width: 400px; display: grid; grid-template-columns: 1fr 2fr; grid-template-areas: "img content"; margin-bottom: 1em; } .me...
...to create gaps between the cards, i use a margin on the items, and then a negative margin on the container: * {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; max-width: 600px; margin: 0 auto; } .wrapper li { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper ul { overflow: hidden; margin: 0 -10px; padding: 0; list-style: none...
...this means i don’t get a final margin on the last row of
boxes.
...And 6 more matches
Grid template areas - CSS: Cascading Style Sheets
.
box1 { grid-area: 1 / 1 / 4 / 2; } what we are doing here when defining all four lines, is defining the area by specifying the lines that enclose that area.
... .wrapper { display: grid; grid-template-columns: repeat(9, 1fr); grid-auto-rows: minmax(100px, auto); grid-template-areas: "hd hd hd hd hd hd hd hd hd" "sd sd sd main main main main main main" "ft ft ft ft ft ft ft ft ft"; } * {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; max-width: 940px; margin: 0 auto; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div class="header">header</div> <div class="sidebar">sid...
... .header { grid-area: hd; } .footer { grid-area: ft; } .content { grid-area: main; } .sidebar { grid-area: sd; } * {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; max-width: 940px; margin: 0 auto; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(9, 1fr); grid-auto-ro...
...And 6 more matches
CSS Layout cookbook - CSS: Cascading Style Sheets
the recipes recipe description layout methods media objects a two-column
box with an image on one side and descriptive text on the other, e.g.
... css grid, float fallback, fit-content() sizing columns when to choose multi-column layout, flex
box or grid for your columns.
... css grid, multicol, flex
box center an element how to center an item horizontally and vertically.
...And 6 more matches
Mozilla CSS extensions - CSS: Cascading Style Sheets
b -moz-binding -moz-border-bottom-colors -moz-border-left-colors -moz-border-right-colors -moz-border-top-colors -moz-
box-align -moz-
box-direction -moz-
box-flex -moz-
box-ordinal-group -moz-
box-orient -moz-
box-pack c–i -moz-context-properties -moz-float-edge -moz-force-broken-image-icon -moz-image-region o -moz-orient -moz-osx-font-smoothing -moz-outline-radius -moz-outline-radius-bottomleft -moz-outline-radius-bottomright -moz-outline-radius-topleft -moz-outline-radius-topright overflow-cl...
...ip-
box overflow-clip-
box-block overflow-clip-
box-inline s–z -moz-stack-sizing :-moz-system-metric(images-in-menus) :-moz-system-metric(mac-graphite-theme) :-moz-system-metric(scrollbar-end-backward) :-moz-system-metric(scrollbar-end-forward) :-moz-system-metric(scrollbar-start-backward) :-moz-system-metric(scrollbar-start-forward) :-moz-system-metric(scrollbar-thumb-proportional) :-moz-system-metric(touch-enabled) :-moz-system-metric(windows-default-theme) -moz-user-focus -moz-user-input -moz-user-modify -moz-window-dragging -moz-window-shadow formerly proprietary properties that are now standard note: to maximize the compatibility of your css, you should use the unprefixed standard properties instead of the prefixed ones listed below.
... -moz-animation-play-state [prefixed version still accepted] -moz-animation-timing-function [prefixed version still accepted] -moz-appearance b -moz-backface-visibility [prefixed version still accepted] -moz-background-clipobsolete since gecko 2 -moz-background-originobsolete since gecko 2 -moz-background-inline-policyobsolete since gecko 32 [superseded by the standard version
box-decoration-break] -moz-background-sizeobsolete since gecko 2 -moz-border-end [superseded by the standard version border-inline-end] -moz-border-end-color [superseded by the standard version border-inline-end-color] -moz-border-end-style [superseded by the standard version border-inline-end-style] -moz-border-end-width [superseded by the standard version border-inline-end-width] -moz...
...And 6 more matches
align-items - CSS: Cascading Style Sheets
in flex
box, it controls the alignment of items on the cross axis.
... baseline; /* overflow alignment (for positional alignment only) */ align-items: safe center; align-items: unsafe center; /* global values */ align-items: inherit; align-items: initial; align-items: unset; values normal the effect of this keyword is dependent of the layout mode we are in: in absolutely-positioned layouts, the keyword behaves like start on replaced absolutely-positioned
boxes, and as stretch on all other absolutely-positioned
boxes.
... for grid items, this keyword leads to a behavior similar to the one of stretch, except for
boxes with an aspect ratio or an intrinsic sizes where it behaves like start.
...And 6 more matches
<basic-shape> - CSS: Cascading Style Sheets
when creating a shape, the reference
box is defined by each property that uses <basic-shape> values.
... the coordinate system for the shape has its origin at the top-left corner of the reference
box, with the x-axis running to the right and the y-axis running downwards.
... all the lengths expressed in percentages are resolved from the used dimensions of the reference
box.
...And 6 more matches
transform-origin - CSS: Cascading Style Sheets
values x-offset is a <length> or a <percentage> describing how far from the left edge of the
box the origin of the transform is set.
... y-offset is a <length> or a <percentage> describing how far from the top edge of the
box the origin of the transform is set.
... x-offset-keyword is one of the left, right, or center keyword describing how far from the left edge of the
box the origin of the transform is set.
...And 6 more matches
transition-duration - CSS: Cascading Style Sheets
formal definition initial value0sapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <time># examples transition-duration: 0.5s <div class="parent"> <div class="
box">lorem</div> </div> .parent { width: 250px; height:125px;} .
box { width: 100px; height: 100px; background-color: red; font-size: 20px; left: 0px; top: 0px; position:absolute; -webkit-transition-property: width height background-color font-size left top transform -webkit-transform color; -webkit-transition-duration:0.5s; -webkit-transition-timing-functio...
...n: ease-in-out; transition-property: width height background-color font-size left top transform -webkit-transform color; transition-duration:0.5s; transition-timing-function: ease-in-out; } .
box1{ transform: rotate(270deg); -webkit-transform: rotate(270deg); width: 50px; height: 50px; background-color: blue; color: yellow; font-size: 18px; left: 150px; top:25px; position:absolute; -webkit-transition-property: width height background-color font-size left top transform -webkit-transform color; -webkit-transition-duration:0.5s; -webkit-transition-timing-function: ease-in-out; transition-property: width height background-color font-size left top transform -webkit-transformv color; transition-duration:0.5s; transition-timi...
...ng-function: ease-in-out; } function updatetransition() { var el = document.queryselector("div.
box"); if (el) { el.classname = "
box1"; } else { el = document.queryselector("div.
box1"); el.classname = "
box"; } return el; } var intervalid = window.setinterval(updatetransition, 7000); transition-duration: 1s <div class="parent"> <div class="
box">lorem</div> </div> .parent { width: 250px; height:125px;} .
box { width: 100px; height: 100px; background-color: red; font-size: 20px; left: 0px; top: 0px; position:absolute; -webkit-transition-property: width height background-color font-size left top -webkit-transform color; -webkit-transition-duration:1s; -webkit-transition-timing-function: ease-in-out; transition-pr...
...And 6 more matches
SVG documentation index - SVG: Scalable Vector Graphics
33 b
box deprecated, svg, svg attribute the b
box attribute defines the maximal bounding
box of a font.
... 61 dominant-baseline reference, svg, svg attribute the dominant-baseline attribute specifies the dominant baseline, which is the baseline used to align the
box’s text and inline-level contents.
... it also indicates the default alignment baseline of any
boxes participating in baseline alignment in the
box’s alignment context.
...And 6 more matches
Patterns - SVG: Scalable Vector Graphics
it defaults to "objectbounding
box" as it did above, so a value of 1 is scaled to the width/height of the object you're applying the pattern to.
...this means the pattern's width/height is only 0.25 of the total
box size.
... to make this work in the example above, we had to consider the size of our
box (200 pixels) and the fact that we wanted the pattern to repeat itself 4 times horizontally and vertically.
...And 6 more matches
Modules - Archive of obsolete content
this is made possible by the use of sand
boxes.
... each sand
box lives in its own compartment.
...we will show how sand
boxes and compartments can be used to improve security in our module system.
...And 5 more matches
XUL user interfaces - Archive of obsolete content
ng sure that you scroll to get all of it: <?xml version="1.0"?> <?xml-stylesheet type="text/css" href="style7.css"?> <!doctype window> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="css getting started - xul demonstration" onload="init();"> <script type="application/javascript" src="script7.js"/> <label class="head-1" value="xul demonstration"/> <v
box> <group
box class="demo-group"> <caption label="day of week calculator"/> <grid> <columns> <column/> <column/> </columns> <rows> <row> <label class="text-prompt" value="date:" accesskey="d" control="date-text"/> <text
box id="date-text" type="timed" timeout="750" oncommand="refresh();"/> </r...
...ow> <row> <label value="day:"/> <h
box id="day-
box"> <label class="day" value="sunday" disabled="true"/> <label class="day" value="monday" disabled="true"/> <label class="day" value="tuesday" disabled="true"/> <label class="day" value="wednesday" disabled="true"/> <label class="day" value="thursday" disabled="true"/> <label class="day" value="friday" disabled="true"/> <label class="day" value="saturday" disabled="true"/> </h
box> </row> </rows> </grid> <h
box class="buttons"> <button id="clear" label="clear" accesskey="c" oncommand="cleardate();"/> <button id="today" label="today" accesskey="t" oncommand="settoday();"/...
...> </h
box> </group
box> <statusbar> <statusbarpanel id="status"/> </statusbar> </v
box> </window> make a new css file, style7.css.
...And 5 more matches
Index of archived content - Archive of obsolete content
core/namespace core/promise dev/panel event/core event/target frame/hidden-frame frame/utils fs/path io/byte-streams io/file io/text-streams lang/functional lang/type loader/cuddlefish loader/sand
box net/url net/xhr places/bookmarks places/favicon places/history platform/xpcom preferences/event-target preferences/service remote/child remote/parent stylesheet/style stylesheet/utils system/child_process ...
... open a web page troubleshooting unit testing using xpcom without chrome using third-party modules (jpm) bootstrapped extensions code snippets alerts and notifications autocomplete bookmarks
boxes canvas code snippets cookies customizing the download progress bar delayed execution dialogs and prompts downloading files drag & drop embedding svg examples and demos from articles file i/o finding window handles forms related code snippets ...
...pprefix miscellaneous modules on page load page loading post data to window preferences progress listeners queryselector rosetta running applications svg animation svg general scrollbar sidebar stringview tab
box toolbar tree uri parsing view source for xul applications windows xml-related code snippets xml:base support in old browsers xpath getattributens common pitfalls communication between html an...
...And 5 more matches
Notes on HTML Reflow - Archive of obsolete content
the xul
box layout model, on the other hand, is constraint based , meaning that geometric preferences and constraints of neighboring elements are taken into consideration before the elements' final geometry can be computed.
... the
box is the geometric primitive for the xul layout model.
...in reflowdirtychild, the parent frame sets the ns_frame_has_dirty_child state bit on itself, and does any bookkeeping necessary to remember which child is dirty (for example, the block frame marks the line
box dirty that contains the child frame).
...And 5 more matches
Building accessible custom components in XUL - Archive of obsolete content
firefox ships with a tab
box element and a tree element, and these elements are fully accessible out-of-the-
box.
...when the user presses enter, we replace the currently focused xul label element with a xul text
box element, copy the initial value over to the text
box element, and call its focus and select methods to set focus to the text
box and select the entire value.
... we register two event handlers on the text
box: onkeypress and onblur.
...And 5 more matches
appendNotification - Archive of obsolete content
eventcallback optional - a javascript function to call to notify you of interesting things that happen with the notification
box.
... see notification
box events.
... priority levels (defined as properties of notification
box) : priority_info_low priority_info_medium priority_info_high priority_warning_low priority_warning_medium priority_warning_high priority_critical_low priority_critical_medium priority_critical_high priority_critical_block buttons : the buttons argument is an array of button descriptions.
...And 5 more matches
Document Object Model - Archive of obsolete content
for example, we could get the state of a check
box by using the code below: var state = document.getelementbyid('casecheck').checked; the value casecheck corresponds to the id of the case sensitive check
box.
...we could do something similar for the other check
box, or any other element that has an id.
...<splitter id="splitbar" resizeafter="grow" hidden="true"/> <h
box> <progressmeter id="progmeter" value="50%" style="margin: 4px;" hidden="true"/> we've added the hidden attribute and set the value to true.
...And 5 more matches
Popup Menus - Archive of obsolete content
it has no special attributes and is a type of
box.
...typically, this will be a specific button or a
box.
...the sample below shows how we might do this: example 1 : source view <popupset> <menupopup id="clipmenu"> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> </popupset> <
box context="clipmenu"> <label value="context click for menu"/> </
box> here, the menupopup has been associated with a
box.
...And 5 more matches
Trees - Archive of obsolete content
in some ways, a tree has some similarities with the list
box.
...the tree also supports nested rows, whereas the list
box does not.
... however, list
boxes may contain any type of content, whereas trees may only contain text and images.
...And 5 more matches
notification - Archive of obsolete content
it will normally be used as part of a notification
box.
... the
box includes a button which the user can use to close the
box.
... persistence type: integer the persistence may be set to a non-zero value so that the notification
box's removetransientnotifications method does not remove them.
...And 5 more matches
prefwindow - Archive of obsolete content
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <prefwindow xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <prefpane id="saveoptions" label="backups"> <preferences> <preference id="pref-backup" name="myapp.mybackups" type="bool"/> <preference id="pref-backupduration" name="myapp.mybackups.duration" type="int"/> </preferences> <check
box label="automatically save backups" preference="pref-backup"/> <text
box label="duration:" preference="pref-backupduration"/> </prefpane> </prefwindow> attributes activetitlebarcolor type: color string specify background color of the window's titlebar when it is active (foreground).
... buttonalign type: string the value of the align attribute for the
box containing the buttons.
... buttondir type: string the value of the dir attribute for the
box containing the buttons.
...And 5 more matches
3D collision detection - Game development
axis-aligned bounding
boxes as with 2d collision detection, axis-aligned bounding
boxes (aabb) are the quickest algorithm to determine whether the two game entities are overlapping or not.
... this consists of wrapping game entities in a non-rotated (thus axis-aligned)
box and checking the positions of these
boxes in the 3d coordinate space to see if they are overlapping.
...the overlapping area between two non-rotated
boxes can be checked with logical comparisons alone, whereas rotated
boxes require additional trigonometric operations, which are slower to calculate.
...And 5 more matches
CSS layout - Learn web development
at this point we've already looked at css fundamentals, how to style text, and how to style and manipulate the
boxes that your content sits inside.
... now it's time to look at how to place your
boxes in the right place in relation to the viewport, and one another.
... we have covered the necessary prerequisites so we can now dive deep into css layout, looking at different display settings, modern layout tools like flex
box, css grid, and positioning, and some of the legacy techniques you might still want to know about.
...And 5 more matches
Example 1 - Learn web development
ry</span> <ul class="optlist hidden"> <li class="option">cherry</li> <li class="option">lemon</li> <li class="option">banana</li> <li class="option">strawberry</li> <li class="option">apple</li> </ul> </div> css /* --------------- */ /* required styles */ /* --------------- */ .select { position: relative; display : inline-block; } .select.active, .select:focus {
box-shadow: 0 0 3px 1px #227755; outline: none; } .select .optlist { position: absolute; top : 100%; left : 0; } .select .optlist.hidden { max-height: 0; visibility: hidden; } /* ------------ */ /* fancy styles */ /* ------------ */ .select { font-size : 0.625em; /* 10px */ font-family : verdana, arial, sans-serif; -moz-
box-sizing : border-
box;
box-sizing : border-bo...
...x; padding : 0.1em 2.5em 0.2em 0.5em; /* 1px 25px 2px 5px */ width : 10em; /* 100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */
box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-
box-sizing : border-
box;
box-sizing : border-
box; text-align : center; border-left : .2em solid #000; border-rad...
...ius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optlist { z-index : 2; list-style: none; margin : 0; padding: 0; background: #f0f0f0; border: .2em solid #000; border-top-width : .1em; border-radius: 0 0 .4em .4em;
box-shadow: 0 .2em .4em rgba(0,0,0,.4);
box-sizing : border-
box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } result for basic state active state html <div class="select active"> <span class="value">cherry</span> <ul class="optlist hidden"> <li class="option">cherry</li> <li class="option">lemon</li> <li class="option">banana</li> <li class="option">s...
...And 5 more matches
Mozilla accessibility architecture
examples of accessible role constants are role_button, role_check
box and role_list, although they can have slightly different names and values in each api.
...for example, tables support nsiaccessibletable, text supports nsiaccessibletext and edit
boxes support nsieditabletext., although this code has been moved into the atk specific directories because it is not currently used in windows.
... the implementations for each kind of object (document, text, table, edit
box, button, etc.) exist in accessible/src.
...And 5 more matches
JIT Optimization Strategies
getprop_un
boxed similar to getprop_definiteslot.
... un
boxed property reads are possible on properties which satisfy all the characteristics of a definite slot, and additionally have been observed to only store values of one kind of value.
... consider the following constructor: function point(x, y) { this.x = x; this.y = y; } if only integers are ever stored in the x and y properties, then the instances of point will be represented in an "un
boxed" mode - with the property values stored as raw 4-byte values within the object.
...And 5 more matches
Building the WebLock UI
i), we'll assume the strings we get from the ui itself are urls we actually want to write to the white list: function addthissite() { var tf = document.getelementbyid("dialog.input"); // weblock is global and declared above weblock.addsite(tf.value); } this javascript function can be called directly from the xul widget, where the input string is retrieved as the value property of the text
box element.
...within a xul application file, elements like <button/>, <menu/>, and <check
box/> can be hooked up to an event model, to scripts, and to the xpcom interfaces that carry out a lot of the browser functionality in mozilla.
...at the top of all xul documents, an xml declaration is followed by the root element for the document, which is usually <window/> but for dialog
boxes can also be the element <dialog/>.
...And 5 more matches
nsIMsgHeaderParser
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) to create an instance, use: var msgheaderparser = components.classes["@mozilla.org/messenger/headerparser;1"] .createinstance(components.interfaces.nsimsgheaderparser); method overview string extractheaderaddressmail
boxes(in string line); void extractheaderaddressname(in string line, out string name); void extractheaderaddressnames(in string line, out string usernames); astring makefulladdress(in astring aname, in astring aaddress); string makefulladdressstring(in string aname, in string aaddress); wstring makefulladdresswstring(in wstring name, in wstring addr); obs...
... wstring reformatunquotedaddresses(in wstring line); void removeduplicateaddresses(in string addrs, in string other_addrs, in prbool removealiasestome, out string newaddress); string unquotephraseoraddr(in string line, in boolean preserveintegrity); wstring unquotephraseoraddrwstring(in wstring line, in boolean preserveintegrity); methods extractheaderaddressmail
boxes() given a string which contains a list of header addresses, returns a comma-separated list of just the 'mail
box' portions.
... if any of the addresses doesn't have a mail
box, then the user name is used instead.
...And 5 more matches
Demo Addon
demo 2 - find the in
box this demo shows various information: it lists all folders of an account (in this case the first one) and marks the in
box folder with a *.
... furthermore, it shows some messages in the in
box and lists a random attachment.
... we start with listing all folders and marking the in
box: let server = accounts[0].incomingserver; let folder = server.rootfolder; // ...
...And 5 more matches
HTMLInputElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,3...
... properties that apply only to elements of type check
box or radio checked boolean: returns / sets the current state of the element when type is check
box or radio.
... defaultchecked boolean: returns / sets the default state of a radio button or check
box as originally specified in html that created this object.
...And 5 more matches
SubtleCrypto.verify() - Web APIs
/* fetch the contents of the "message" text
box, and encode it in a form we can use for sign operation.
... */ function getmessageencoding() { const message
box = document.queryselector(".rsassa-pkcs1 #message"); let message = message
box.value; let enc = new textencoder(); return enc.encode(message); } /* fetch the encoded message-to-sign and verify it against the stored signature.
... /* fetch the contents of the "message" text
box, and encode it in a form we can use for sign operation.
...And 5 more matches
Coordinate systems - CSS: Cascading Style Sheets
this simple example creates a set of nested
boxes.
... whenever the mouse enters, moves around inside, or exits the inner
box, the corresponding event is handled by updating a set of informational messages within the
box, listing out the current mouse coordinates in each of the four available coordinate systems.
... displaying the coordinates as we'll see in the html, the inner
box (the one we're watching for events on) contains several paragraphs; one for each of the four coordinate systems we'll be reporting on.
...And 5 more matches
Layout using named grid lines - CSS: Cascading Style Sheets
* {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } when defining the grid, i name my lines inside square brackets.
... .
box1 { grid-column-start: main-start; grid-row-start: main-start; grid-row-end: main-end; } .
box2 { grid-column-start: content-end; grid-row-start: main-start; grid-row-end: content-end; } .
box3 { grid-column-start: content-start; grid-row-start: main-start; } .
box4 { grid-column-start: content-start; grid-column-end: main-end; grid-row-start: content-end; } <div class="wra...
...pper"> <div class="
box1">one</div> <div class="
box2">two</div> <div class="
box3">three</div> <div class="
box4">four</div> </div> everything else about line-based placement still works in the same way and you can mix named lines and line numbers.
...And 5 more matches
Overview of CSS Shapes - CSS: Cascading Style Sheets
the result is that the content now curves around the circular shape rather than following the rectangle created by the
box of the image.
...if you do not have shapes support in the browser, the user will see content flowing around the sides of a rectangular
box as before.
...the specification defines four <basic-shape> values, which are: inset() circle() ellipse() polygon() using the value inset() wraps text around a rectangular shape however you are able to add offset values, thus pulling the line
boxes of any wrapping content closer to the object than would otherwise happen.
...And 5 more matches
Linear-gradient Generator - CSS: Cascading Style Sheets
nput[data-topic="alpha"] > .name { width: 60px; } .ui-color-picker .input[data-topic="alpha"] > input { float: right; } .ui-color-picker .input[data-topic="hexa"] { width: auto; float: right; margin: 6px 8px 0 0; } .ui-color-picker .input[data-topic="hexa"] > .name { display: none; } .ui-color-picker .input[data-topic="hexa"] > input { width: 90px; height: 24px; padding: 2px 0; -moz-
box-sizing: border-
box; -webkit-
box-sizing: border-
box;
box-sizing: border-
box; } /* preview color */ .ui-color-picker .preview { width: 95px; height: 53px; margin: 5px; margin-top: 10px; border: 1px solid #ddd; background-image: url("images/alpha.png"); float: left; position: relative; } .ui-color-picker .preview:before { height: 100%; width: 50%; left: 50%; top: 0; content: ""; ba...
...ker .switch_mode:hover { background-color: #ccc; cursor: pointer; } /* * ui component */ .ui-input-slider { height: 20px; font-family: "segoe ui", arial, helvetica, sans-serif; -moz-user-select: none; user-select: none; } .ui-input-slider * { float: left; height: 100%; } /* input slider */ .ui-input-slider > input { margin: 0; padding: 0; width: 50px; text-align: center; -moz-
box-sizing: border-
box; -webkit-
box-sizing: border-
box;
box-sizing: border-
box; } .ui-input-slider-info { width: 90px; padding: 0px 10px 0px 0px; text-align: right; text-transform: lowercase; line-height: inherit; } .ui-input-slider-left, .ui-input-slider-right { width: 16px; cursor: pointer; background: url("arrows.png") center left no-repeat; } .ui-input-slider-right { background: url...
...px; padding: 0; text-align: center; } /* * ui dropdown */ /* dropdown */ .ui-dropdown { height: 2em; width: 120px; font-family: "segoe ui", arial, helvetica, sans-serif; font-size: 12px; background-image: url("dropdown_arrow.svg"); background-position: right 0.3em center; background-repeat: no-repeat; background-color: #359740; background-size: 1.1em; position: relative; -moz-
box-sizing: border-
box; -webkit-
box-sizing: border-
box;
box-sizing: border-
box; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; user-select: none; } .ui-dropdown:hover { cursor: pointer; background-color: #208b20; } /* dropdown select button */ .ui-dropdown-select { padding: 0 0.75em; color: #fff; line-height: 2em; } /* dropdown list */ .ui-dropdown-list { ...
...And 5 more matches
border-radius - CSS: Cascading Style Sheets
top-left-and-bottom-right is a <length> or a <percentage> denoting a radius to use for the border in the top-left and bottom-right corners of the element's
box.
... top-right-and-bottom-left is a <length> or a <percentage> denoting a radius to use for the border in the top-right and bottom-left corners of the element's
box.
... top-left is a <length> or a <percentage> denoting a radius to use for the border in the top-left corner of the element's
box.
...And 5 more matches
<display-inside> - CSS: Cascading Style Sheets
if its outer display type is inline or run-in, and it is participating in a block or inline formatting context, then it generates an inline
box.
... otherwise it generates a block container
box.
... flow-root the element generates a block element
box that establishes a new block formatting context, defining where the formatting root lies.
...And 5 more matches
mask - CSS: Cascading Style Sheets
url(masks.svg#star) 40px 20px; /* element within svg graphic used as mask positioned 40px from the top and 20px from the left */ mask: url(masks.svg#star) 0 0/50px 50px; /* element within svg graphic used as mask with a width and height of 50px */ mask: url(masks.svg#star) repeat-x; /* element within svg graphic used as horizontally repeated mask */ mask: url(masks.svg#star) stroke-
box; /* element within svg graphic used as mask extending to the
box enclosed by the stroke */ mask: url(masks.svg#star) exclude; /* element within svg graphic used as mask and combined with background using non-overlapping parts */ /* global values */ mask: inherit; mask: initial; mask: unset; /* multiple masks */ mask: url(masks.svg#star) left / 16px repeat-y, /* element within sv...
... <geometry-
box> if only one <geometry-
box> value is given, it sets both mask-origin and mask-clip.
... if two <geometry-
box> values are present, then the first sets mask-origin and the second sets mask-clip.
...And 5 more matches
max-block-size - CSS: Cascading Style Sheets
none no limit on the size of the
box.
... everything else about the two
boxes is identical, including the values used for max-block-size.
...both
boxes share the standard-
box class, which simply establishes coloring, padding, and their respective values of max-block-size.
...And 5 more matches
object-fit - CSS: Cascading Style Sheets
you can alter the alignment of the replaced element's content object within the element's
box using the object-position property.
... values contain the replaced content is scaled to maintain its aspect ratio while fitting within the element’s content
box.
... the entire object is made to fill the
box, while preserving its aspect ratio, so the object will be "letter
boxed" if its aspect ratio does not match the aspect ratio of the
box.
...And 5 more matches
overflow-y - CSS: Cascading Style Sheets
values visible content is not clipped and may be rendered outside the padding
box's top and bottom edges.
... hidden content is clipped if necessary to fit vertically in the padding
box.
... clip like for hidden, the content is clipped to the element's padding
box.
...And 5 more matches
place-items - CSS: Cascading Style Sheets
the align-items and justify-items properties) in a relevant layout system such as grid or flex
box.
...ms: flex-end normal; place-items: left auto; place-items: right normal; /* baseline alignment */ place-items: baseline normal; place-items: first baseline auto; place-items: last baseline normal; place-items: stretch auto; /* global values */ place-items: inherit; place-items: initial; place-items: unset; values auto the value used is the value of the justify-items property of the parents
box, unless the
box has no parent, or is absolutely positioned, in these cases, auto represents normal.
... in absolutely-positioned layouts, the keyword behaved like start on replaced absolutely-positioned
boxes, and as stretch on all other absolutely-positioned
boxes.
...And 5 more matches
place-self - CSS: Cascading Style Sheets
the align-self and justify-self properties) in a relevant layout system such as grid or flex
box.
... normal the effect of this keyword is dependent of the layout mode we are in: in absolutely-positioned layouts, the keyword behaves like start on replaced absolutely-positioned
boxes, and as stretch on all other absolutely-positioned
boxes.
... for grid items, this keyword leads to a behavior similar to the one of stretch, except for
boxes with an aspect ratio or an intrinsic sizes where it behaves like start.
...And 5 more matches
transition-delay - CSS: Cascading Style Sheets
formal definition initial value0sapplies toall elements, ::before and ::after pseudo-elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax <time># examples transition-delay: 0.5s <div class="parent"> <div class="
box">lorem</div> </div> .parent { width: 250px; height:125px;} .
box { width: 100px; height: 100px; background-color: red; font-size: 20px; left: 0px; top: 0px; position:absolute; -webkit-transition-property: width height background-color font-size left top color; -webkit-transition-duration:2s; -webkit-transition-delay:0.5s; -webkit-transition-timing-fu...
...nction: linear; transition-property: width height background-color font-size left top color; transition-duration:2s; transition-delay:0.5s; transition-timing-function: linear; } .
box1{ width: 50px; height: 50px; background-color: blue; color: yellow; font-size: 18px; left: 150px; top:25px; position:absolute; -webkit-transition-property: width height background-color font-size left top color; -webkit-transition-duration:2s; -webkit-transition-delay:0.5s; -webkit-transition-timing-function: linear; transition-property: width height background-color font-size left top color; transition-duration:2s; transition-delay:0.5s; transition-timing-function: linear; } function updatetransition() { var el = document.querys...
...elector("div.
box"); if (el) { el.classname = "
box1"; } else { el = document.queryselector("div.
box1"); el.classname = "
box"; } return el; } var intervalid = window.setinterval(updatetransition, 7000); transition-delay: 1s <div class="parent"> <div class="
box">lorem</div> </div> .parent { width: 250px; height:125px;} .
box { width: 100px; height: 100px; background-color: red; font-size: 20px; left: 0px; top: 0px; position:absolute; -webkit-transition-property: width height background-color font-size left top color; -webkit-transition-duration:2s; -webkit-transition-delay:1s; -webkit-transition-timing-function: linear; transition-property: width height background-color font-size left top color; transition...
...And 5 more matches
z-index - CSS: Cascading Style Sheets
for a positioned
box (that is, one with any position other than static), the z-index property specifies: the stack level of the
box in the current stacking context.
... whether the
box establishes a local stacking context.
... values auto the
box does not establish a new local stacking context.
...And 5 more matches
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
sand
box applies extra restrictions to the content in the frame.
... allow-popups-to-escape-sand
box: lets the sand
boxed document open new windows without those windows inheriting the sand
boxing.
... for example, this can safely sand
box an advertisement without forcing the same restrictions upon the page the ad links to.
...And 5 more matches
d - SVG: Scalable Vector Graphics
three elements have this attribute: <path>, <glyph>, and <missing-glyph> html,body,svg { height:100% } <svg view
box="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="red" d="m 10,30 a 20,20 0,0,1 50,30 a 20,20 0,0,1 90,30 q 90,60 50,90 q 10,60 10,30 z" /> </svg> path for <path>, d is a string containing a series of path commands that define the path to be drawn.
...however the <glyph> element has its origin in the bottom left corner of its letter
box.
... formula: pn = {xo + dx, yo + dy} examples html,body,svg { height:100% } <svg view
box="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <path fill="none" stroke="red" d="m 10,10 h 10 m 0,10 h 10 m 0,10 h 10 m 40,20 h 10 m 0,10 h 10 m 0,10 h 10 m 0,10 h 10 m 50,50 h 10 m-20,10 h 10 m-20,10 h 10 m-20,10 h 10" /> </svg> lineto path commands lineto instructions draw a straight line from the current po...
...And 5 more matches
refX - SVG: Scalable Vector Graphics
value <length-percentage> | <number> | left | center | right default value 0 animatable yes <length-percentage> lengths are interpreted as being in the coordinate system of the marker contents, after application of the view
box and preserveaspectratio attributes.
... percentage values are interpreted as being a percentage of the view
box width.
... <number> numbers are interpreted as being in the coordinate system of the marker contents, after application of the view
box and preserveaspectratio attributes.
...And 5 more matches
refY - SVG: Scalable Vector Graphics
value <length-percentage> | <number> | top | center | bottom default value 0 animatable yes <length-percentage> lengths are interpreted as being in the coordinate system of the marker contents, after application of the view
box and preserveaspectratio attributes.
... percentage values are interpreted as being a percentage of the view
box height.
... <number> numbers are interpreted as being in the coordinate system of the marker contents, after application of the view
box and preserveaspectratio attributes.
...And 5 more matches
Adding menus and submenus - Archive of obsolete content
the menubar element should be a child of a tool
box element because it is treated like another toolbar on systems other than mac os x.
... the tool
box should be positioned near the top of the xul document, and the code should be similar to this: <tool
box> <menubar id="xulschoolhello-menubar"> <menu id="xulschoolhello-greeting-menu" label="&xulschoolhello.greeting.label;"> <menupopup> <menuitem label="&xulschoolhello.greet.short.label;" oncommand="xulschoolchrome.greetingdialog.greetingshort(event);" /> <menuitem label="&xulschoolhello.greet.medium.label;" oncommand="xulschoolchrome.greetingdialog.greetingmedium(event);" /> <menuitem label="&xulschoolhello.greet.long.label;" onc...
...ommand="xulschoolchrome.greetingdialog.greetinglong(event);" /> <menuseparator /> <menuitem label="&xulschoolhello.greet.custom.label;" oncommand="xulschoolchrome.greetingdialog.greetingcustom(event);" /> </menupopup> </menu> </menubar> </tool
box> this code displays a simple menu with options for 3 different types of greetings, a menuseparator, and finally an option to show a custom greeting.
...And 4 more matches
Adding preferences to an extension - Archive of obsolete content
0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <prefwindow id="stockwatcher2-prefs" title="stockwatcher 2 options" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <prefpane id="sw2-stock-pane" label="stock settings"> <preferences> <preference id="pref_symbol" name="extensions.stockwatcher2.symbol" type="string"/> </preferences> <h
box align="center"> <label control="symbol" value="stock to watch: "/> <text
box preference="pref_symbol" id="symbol" maxlength="4"/> </h
box> </prefpane> </prefwindow> the <preferences> block establishes all the settings we implement as well as their types.
...the <h
box> element is used to lay out the user interface by indicating that the widgets inside it should be positioned horizontally, next to each other in the window.
...the first is a label describing the text
box.
...And 4 more matches
In-Depth - Archive of obsolete content
button, check
box-container, check
box, dialog, dualbutton, dualbutton-dropdown, list
box, menu, menulist-textfield, menulist-button, menulist, menulist-text, progressbar, progresschunk, radio-container, radio, resizer, resizerpanel, separator, scrollbar, statusbar, statusbarpanel, toolbarbutton, tool
box, toolbar, treeheadercell, treeheadersortarrow, treeview, treeitem, treetwisty, treetwistyopen, tooltip, textfield...
...-moz-border-radius rounds the corners of a
box.
...-moz-
box-direction controls which way the items in this
box are displayed.
...And 4 more matches
Panels - Archive of obsolete content
for example, the following panel displays a text
box for entering a name.
... <?xml-stylesheet href="chrome://global/skin" type="text/css"?> <window xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <button label="details" type="panel"> <panel id="search-panel"> <label control="name" value="name:"/> <text
box id="name"/> </panel> </button> </window> many panels will be associated with a button, as in this example.
... <label value="search" popup="search-panel"/> <panel id="search-panel"> <label control="search" value="terms:"/> <text
box id="search"/> </panel> to attach a panel to an non-button element, for instance to have a panel open when a label is clicked, use the popup attribute.
...And 4 more matches
Rule Compilation - Archive of obsolete content
for instance, if generating the items in a list
box, you will typically use only one rule.
...<v
box datasources="http://www.xulplanet.com/ds/sample.rdf" ref="http://www.xulplanet.com/rdf/a" flex="1"> <template> <query> -- query content goes here -- </query> <rule> -- rule content goes here -- </rule> <rule> -- rule content goes here -- </rule> </template> </v
box> query/rule compilation and lazy content generation when the template builder starts processing, and after it has started the datasource loading, it first must compile the query and rules.
...for instance, consider the example below: <v
box datasources="http://www.xulplanet.com/ds/sample.rdf" ref="http://www.xulplanet.com/rdf/a" hidden="true"> <template> ...
...And 4 more matches
SQLite Templates - Archive of obsolete content
this simple example shows how to display a list
box containing the values in one column in a database table.
... <list
box datasources="profile:userdata.sqlite" ref="*" querytype="storage"> <template> <query> select name from myfriends </query> <action> <listitem uri="?" label="?name"/> </action> </template> </list
box> the query returns the list of values from the 'name' column in the table 'myfriends'.
...the effect is a list
box containing the names from the database.
...And 4 more matches
XML Templates - Archive of obsolete content
an example: <list
box datasources="people.xml" ref="*" querytype="xml"> <template> ...
... </template> <list
box> the url in the datasources attribute may be a relative url or an absolute url.
...here is an example: <list
box datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="person"/> <action> <listitem uri="?" label="?name"/> </action> </template> </list
box> the expr attribute is a very simple xpath expression which simply retrieves the person elements from within the datasource.
...And 4 more matches
Broadcasters and Observers - Archive of obsolete content
example 1 : source view <command id="my_command" label="open"/> <button command="my_command"/> <check
box label="open in a new window" command="my_command"/> in this example, the button does not have a label attribute, however it is attached to a command that does.
...the check
box already has a label, however, it will be overridden by the command's label.
... the result is that both the button and the check
box will have the same label 'open'.
...And 4 more matches
Scrolling Menus - Archive of obsolete content
it is implemented using an arrowscroll
box element.
... this element can be used to create a scrolling
box with arrows.
... the arrowscroll
box can be used anywhere a regular
box can be used.
...And 4 more matches
XUL Changes for Firefox 1.5 - Archive of obsolete content
<scrollcorner> a <scrollcorner> element is added which is used to create the small
box in the intersection of the horizontal and vertical scrollbars.
... <richlist
box> and <richlistitem> the <richlist
box> and <richlistitem> elements are used for creating lists containing arbitrary content.
... this element works similarly to the <list
box> which is designed primarily for lists of textual items.
...And 4 more matches
XUL Event Propagation - Archive of obsolete content
the widget hierarchy consider the following xul file: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="events" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" oncommand="alert('window handler')"> <v
box> <v
box style="background-color: lightgrey;" oncommand="alert('
box handler')"> <menu class="menu" label="file" oncommand="alert('menu handler')"> <menupopup> <menuitem oncommand="alert('new item alert')" label="new" /> <menuitem label="open" /> <menuitem oncommand="alert('close handler')" label="close" /> </menupopup> </menu> <menu class="menu" label="edit">...
... <menupopup> <menuitem oncommand="alert('edit source handler')" label="edit source" /> <menuitem label="reload" /> <menuitem label="view source" /> </menupopup> </menu> </v
box> <spring flex="1" /> </v
box> </window> in this file, the lowest-down, or "leaf" elements are the menuitems.
...in the example above, when the menuitem raises the "command" event, indicating that it has been selected, the menupopup, the menu itself, the parent
box, or the root window element itself can all take advantage of this.
...And 4 more matches
menuitem - Archive of obsolete content
when autocheck is true, the button type should be "check
box" or "radio".
... for buttons, the type attribute must be set to check
box or radio for this attribute to have any effect.
...if the
box direction is reversed, the cropping is reversed.
...And 4 more matches
scale - Archive of obsolete content
increment type: integer the amount by which the curpos (for scroll bars) or value (for number
boxes and scale) attribute changes when the arrows are clicked(or scales are dragged).
... type: integer the maximum value that the scale or number
box may be set to.
... the default value is 100 for scales and infinity for number
boxes.
...And 4 more matches
splitter - Archive of obsolete content
the v
box is used to hold the .png image that a user clicks on to resize the search bar.--> <splitter tooltiptext="resize the search
box" oncommand="alert('the splitter was dragged')"> <v
box id="example_v
box" /> </splitter> attributes collapse type: one of the values below determines which side of the splitter is collapsed when its grippy is clicked.
... properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
...lumndrag="true"> <treecols> <treecol id="name" label="name" flex="1"/> <splitter class="tree-splitter"/> <treecol id="id" label="id" flex="1"/> <splitter class="tree-splitter"/> <treecol id="date" label="date" flex="1"/> <splitter class="tree-splitter"/> </treecols> <treechildren/> </tree> splitter resizing and overflow the degree to which a splitter will resize a
box, and what happens during the resize and after the limit is reached, depends on the height (or width) specified for the
box as an attribute or in css, the min-height (or min-width), the intrinsic height of the
box contents, and the presence or absence of a collapse attribute on the splitter.
...And 4 more matches
window - Archive of obsolete content
it is by default a horizontally oriented
box.
... as it is a
box, all
box attributes can be used.
...--> <window id="rootwnd" title="register online!" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <v
box> <h
box> <image src="application_form.png"/> <description>register online!</description> </h
box> <group
box align="start"> <caption label="your information"/> <radiogroup> <v
box> <h
box> <label control="your-fname" value="enter first name:"/> <text
box id="your-fname" value="johan"/> </h
box> <h
box> ...
...And 4 more matches
display-outside - Archive of obsolete content
the display-outside css property specifies the outer display type of the
box generated by an element, dictating how the element participates in its parent formatting context.
... values block-level the element generates a block-level
box, and participates in a block formatting context.
... inline-level the element generates an inline-level
box, and participates in an inline formatting context.
...And 4 more matches
Organizing your CSS - Learn web development
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.
... you may have used a css property in a specific way to get around older browser incompatibilities, for example: .
box { background-color: red; /* fallback for older browsers that don't support gradients */ background-image: linear-gradient(to right, #ff0000, #aa0000); } perhaps you followed a tutorial to achieve something, and the css is a little non-obvious.
...} .product-
box { ...
...And 4 more matches
Responsive design - Learn web development
for example, if the line lengths become unreadably long as the screen size increases, or a
box becomes squashed with two words on each line as it narrows.
...on narrow screens the layout displays the
boxes stacked on top of one another: on wider screens they move to two columns: note: you can find the live example and source code for this example on github.
... modern layout technologies modern layout methods such as multiple-column layout, flex
box, and grid are responsive by default.
...And 4 more matches
Introduction to events - Learn web development
for example, if the user selects a button on a webpage, you might want to respond to that action by displaying an information
box.
...let's look at an example to make this easier — open up the show-video-
box.html example in a new tab (and the source code in another tab.) it is also available live below: this is a pretty simple example that shows and hides a <div> with a <video> element inside it: <button>display video</button> <div class="hidden"> <video> <source src="rabbit320.mp4" type="video/mp4"> <source src="rabbit320.webm" type="video/webm"> <p>your browser doesn't support ht...
...here is a <a href="rabbit320.mp4">link to the video</a> instead.</p> </video> </div> when the <button> is selected, the video is displayed, by changing the class attribute on the <div> from hidden to showing (the example's css contains these two classes, which position the
box off the screen and on the screen, respectively): btn.onclick = function() { video
box.setattribute('class', 'showing'); } we then add a couple more onclick event handlers — the first one to the <div> and the second one to the <video>.
...And 4 more matches
Dynamic behavior in Svelte: working with variables and props - Learn web development
replace the existing <ul> element with the following simplified version to get an idea of how it works: <ul> {#each todos as todo, index (todo.id)} <li> <input type="check
box" checked={todo.completed}/> {index}.
...replace your existing <ul> block with the following: <!-- todos --> <ul role="list" class="todo-list stack-large" aria-labelledby="list-heading"> {#each todos as todo (todo.id)} <li class="todo"> <div class="stack-small"> <div class="c-cb"> <input type="check
box" id="todo-{todo.id}" checked={todo.completed}/> <label for="todo-{todo.id}" class="todo-label"> {todo.name} </label> </div> <div class="btn-group"> <button type="button" class="btn"> edit <span class="visually-hidden">{todo.name}</span> </button> <button type="button" class="btn btn__danger"> del...
...ete <span class="visually-hidden">{todo.name}</span> </button> </div> </div> </li> {:else} <li>nothing to do here!</li> {/each} </ul> notice how we are using curly braces to embed javascript expressions in html attributes, like we did with the checked and id attributes of the check
box.
...And 4 more matches
The Firefox codebase: CSS Guidelines
using variables use the variable according to its naming do this: xul|tab:hover { background-color: var(--in-content-
box-background-hover); } not this: #certificateerrordebuginformation { background-color: var(--in-content-
box-background-hover); } localization text direction for margins, padding and borders, use inline-start/inline-end rather than left/right.
... 99% theme 70% theme 70% content 99% content font-*, color, *-color, border-*, -moz-appearance [1] line-height, padding, margin cursor, width, max-width, top, bottom [2], etc overflow, direction, display, *-align, align-*, *-
box-*, flex-*, order if some css is layout or functionality related, then it is likely content css.
...part of those adjustments include making all
box-shadow invisible, so this is something to be aware of if you create a focus ring or a border using the
box-shadow property: consider using a border or an outline if you want the border/focus ring to stay visible in high-contrast mode.
...And 4 more matches
JIT Optimization Outcomes
notun
boxed the object whose property is being accessed is not formatted as an un
boxed object.
... un
boxedconvertedtonative the object whose property is being accessed was previously un
boxed but was deoptimized and converted to a native object.
... structnofield the un
boxed property being accessed does not correspond to a field on the typed object.
...And 4 more matches
nsIDBFolderInfo
obsolete since gecko 1.8 void getmail
boxname(in nsstring
boxname); native code only!
...obsolete since gecko 1.8 void setmail
boxname(in nsstring new
boxname); native code only!
... highwater nsmsgkey imaphierarchyseparator wchar imaptotalpendingmessages long imapuidvalidity long imapunreadpendingmessages long knownartsset string locale astring mail
boxname astring nummessages long numunreadmessages long sortorder nsmsgviewsortordervalue sorttype nsmsgviewsorttypevalue version unsigned long viewflags nsmsgviewflagstypevalue viewtype n...
...And 4 more matches
Settings - Firefox Developer Tools
to see the settings, open any of the developer tools, and then: click the "settings" command in the menu: or press f1 to toggle between the active tool and the settings pane the settings pane looks something like this: categories default firefox developer tools this group of check
boxes determines which tools are enabled in the tool
box.
... available tool
box buttons this group of check
boxes determines which tools get an icon in the tool
box's toolbar.
... note that in firefox 52 we removed the check
box to toggle the "select element" button.
...And 4 more matches
ResizeObserver - Web APIs
the resizeobserver interface reports changes to the dimensions of an element's content or border
box, or the bounding
box of an svgelement.
... note: the content
box is the
box in which content can be placed, meaning the border
box minus the padding and border width.
... the border
box encompasses the content, padding, and border.
...And 4 more matches
ResizeObserverEntry - Web APIs
properties resizeobserverentry.border
boxsize read only an object containing the new border
box size of the observed element when the callback is run.
... resizeobserverentry.content
boxsize read only an object containing the new content
box size of the observed element when the callback is run.
... note: the content
box is the
box in which content can be placed, meaning the border
box minus the padding and border width.
...And 4 more matches
Taking still photos with WebRTC - Web APIs
<canvas id="canvas"> </canvas> <div class="output"> <img id="photo" alt="the screen capture will appear in this
box."> </div> that's all of the relevant html.
... wrapping up the startup() method there are only two more lines of code in the startup() method: clearphoto(); } this is where we call the clearphoto() method we'll describe below in the section clearing the photo
box.
... clearing the photo
box clearing the photo
box involves creating an image, then converting it into a format usable by the <img> element that displays the most recently captured frame.
...And 4 more matches
Window.prompt() - Web APIs
the above prompt appears as follows (in chrome on os x): notes a prompt dialog contains a single-line text
box, a cancel button, and an ok button, and returns the (possibly empty) text the user entered into that text
box.
... the following text is shared between this article, dom:window.confirm and dom:window.alert dialog
boxes are modal windows; they prevent the user from accessing the rest of the program's interface until the dialog
box is closed.
... for this reason, you should not overuse any function that creates a dialog
box (or modal window).
...And 4 more matches
WAI-ARIA Roles - Accessibility
to be supported, the cell must be nested in an element with the role of row.aria: check
box rolethe check
box role is used for checkable interactive controls.
... elements containing role="check
box" must also include the aria-checked attribute to expose the check
box's state to assistive technology.aria: comment rolethe comment landmark role semantically denotes a comment/reaction to some content on the page, or to a previous comment.aria: complementary rolethe complementary landmark role is used to designate a supporting section that relates to the main content, yet can stand alone when separated.
... these sections are frequently presented as sidebars or call-out
boxes.
...And 4 more matches
-moz-image-rect - CSS: Cascading Style Sheets
css the css defines one container style, then the styles for the four
boxes that comprise the complete image.
... the container looks like this: #container { width:267px; height:272px; top:100px; left:100px; position:absolute; font-size:16px; text-shadow:white 0px 0px 6px; text-align:center; } then the four
boxes defining the segments of the image are defined.
... #
box1 { background-image: -moz-image-rect(url(https://mdn.mozillademos.org/files/12053/firefox.png), 0%, 50%, 50%, 0%); width:133px; height:136px; position:absolute; } this is the top-left corner of the image.
...And 4 more matches
:checked - CSS: Cascading Style Sheets
the :checked css pseudo-class selector represents any radio (<input type="radio">), check
box (<input type="check
box">), or option (<option> in a <select>) element that is checked or toggled to an on state.
... /* matches any checked/selected radio, check
box, or option */ :checked { margin-left: 25px; border: 1px solid blue; } the user can engage this state by checking/selecting an element, or disengage it by unchecking/deselecting the element.
... syntax :checked examples basic example html <div> <input type="radio" name="my-input" id="yes"> <label for="yes">yes</label> <input type="radio" name="my-input" id="no"> <label for="no">no</label> </div> <div> <input type="check
box" name="my-check
box" id="opt-in"> <label for="opt-in">check me!</label> </div> <select name="my-select" id="fruit"> <option value="opt1">apples</option> <option value="opt2">grapes</option> <option value="opt3">pears</option> </select> css div, select { margin: 8px; } /* labels for checked inputs */ input:checked + label { color: red; } /* radio element, when checked */ input[typ...
...And 4 more matches
Handling content breaks in multicol - CSS: Cascading Style Sheets
content is broken between column
boxes in multiple-column layout in the same way that it is broken between pages in paged media.
...in multicol, the fragmentainer is the column
box.
... a column
box can contain other markup and there are many places where a break would not be ideal.
...And 4 more matches
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
it then moves onto the next line, creating a new row track, and fills in more items: * {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; 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, 100px); grid-template-rows: repeat(2, 100px); grid-gap: 10px; } ...
... * {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { writing-mode: vertical-lr; display: grid; grid-template-columns: repeat(3, 100px); grid-template-rows: repeat(2,...
...this occurs once we've flipped the grid onto the side, like this: * {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { writing-mode: vertical-lr; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1...
...And 4 more matches
Layout and the containing block - CSS: Cascading Style Sheets
when a user agent (such as your browser) lays out a document, it generates a
box for every element.
... each
box is divided into four areas: content area padding area border area margin area many developers believe that the containing block of an element is always the content area of its parent, but that isn't necessarily true.
... identifying the containing block the process for identifying the containing block depends entirely on the value of the element's position property: if the position property is static, relative, or sticky, the containing block is formed by the edge of the content
box of the nearest ancestor element that is either a block container (such as an inline-block, block, or list-item element) or establishes a formatting context (such as a table container, flex container, grid container, or the block container itself).
...And 4 more matches
Column layouts - CSS: Cascading Style Sheets
whether you use grid, flex
box or multi-column layout will depend on what you are trying to achieve, and in this recipe we explore these options.
... you do not need to target individual column
boxes for styling.
... a single row of items with equal heights — flex
box flex
box can be used to break content into columns by setting flex-direction to row, however flex
box targets the elements inside the flex container and will place each direct child into a new column.
...And 4 more matches
aspect-ratio - CSS: Cascading Style Sheets
the aspect-ratio css property sets a preferred aspect ratio for the
box, which will be used in the calculation of auto sizes and some other layout functions.
... syntax aspect-ratio: 1 / 1; /* global values */ aspect-ratio: inherit; aspect-ratio: initial; aspect-ratio: unset; values <auto> replaced elements with an intrinsic aspect ratio use that aspect ratio, otherwise the
box has no preferred aspect ratio.
... size calculations involving intrinsic aspect ratio always work with the content
box dimensions.
...And 4 more matches
background-clip - CSS: Cascading Style Sheets
the background-clip css property sets whether an element's background extends underneath its border
box, padding
box, or content
box.
... syntax /* keyword values */ background-clip: border-
box; background-clip: padding-
box; background-clip: content-
box; background-clip: text; /* global values */ background-clip: inherit; background-clip: initial; background-clip: unset; values border-
box the background extends to the outside edge of the border (but underneath the border in z-ordering).
... padding-
box the background extends to the outside edge of the padding.
...And 4 more matches
background - CSS: Cascading Style Sheets
constituent properties this property is a shorthand for the following css properties: background-attachment background-clip background-color background-image background-origin background-position background-repeat background-size syntax /* using a <background-color> */ background: green; /* using a <bg-image> and <repeat-style> */ background: url("test.jpg") repeat-y; /* using a <
box> and <background-color> */ background: border-
box red; /* a single image, centered and scaled */ background: no-repeat center/80% url("../img/image.png"); the background property is specified as one or more background layers, separated by commas.
... the <
box> value may be included zero, one, or two times.
... values <attachment> see background-attachment <
box> see background-clip and background-origin <background-color> see background-color <bg-image> see background-image <position> see background-position <repeat-style> see background-repeat <bg-size> see background-size.
...And 4 more matches
break-inside - CSS: Cascading Style Sheets
the break-inside css property sets how page, column, or region breaks should behave inside a generated
box.
... if there is no generated
box, the property is ignored.
... values auto allows, but does not force, any break (page, column, or region) to be be inserted within the principal
box.
...And 4 more matches
<display-outside> - CSS: Cascading Style Sheets
syntax valid <display-outside> values: block the element generates a block element
box, generating line breaks both before and after the element when in the normal flow.
... inline the element generates one or more inline element
boxes that do not generate line breaks before or after themselves.
... in normal flow, the next element will be on the same line if there is space run-in the element generates a run-in
box.
...And 4 more matches
line-height - CSS: Cascading Style Sheets
the line-height css property sets the height of a line
box.
...on block-level elements, it specifies the minimum height of line
boxes within the element.
... on non-replaced inline elements, it specifies the height that is used to calculate line
box height.
...And 4 more matches
max-height - CSS: Cascading Style Sheets
none no limit on the size of the
box.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | w3c understanding wcag 2.0 formal definition initial valuenoneapplies toall elements but non-replaced inline elements, table columns, and column groupsinheritednopercentagesthe percentage is calculated with respect to the height of the generated
box's containing block.
... typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting max-height using percentage and keyword values table { max-height: 75%; } form { max-height: none; } specifications specification status comment css
box sizing module level 4the definition of 'max-height' in that specification.
...And 4 more matches
overflow-block - CSS: Cascading Style Sheets
the overflow-block css property sets what shows when content overflows the block start and block end edges of a
box.
... values visible content is not clipped and may be rendered outside the padding
box's block start and block end edges.
... hidden content is clipped if necessary to fit the block dimension in the padding
box.
...And 4 more matches
overflow-x - CSS: Cascading Style Sheets
values visible content is not clipped and may be rendered outside the padding
box's left and right edges.
... hidden content is clipped if necessary to fit horizontally in the padding
box.
... clip like for hidden, the content is clipped to the element's padding
box.
...And 4 more matches
text-decoration-skip - CSS: Cascading Style Sheets
/* keyword values */ text-decoration-skip: none; text-decoration-skip: objects; text-decoration-skip: spaces; text-decoration-skip: edges; text-decoration-skip:
box-decoration; /* multiple keywords */ text-decoration-skip: objects spaces; text-decoration-skip: leading-spaces trailing-spaces; text-decoration-skip: objects edges
box-decoration; /* global values */ text-decoration-skip: inherit; text-decoration-skip: initial; text-decoration-skip: unset; syntax values none nothing is skipped.
... thus, text decoration is drawn for all text content and across atomic inline-level
boxes.
... objects the entire margin
box of the element is skipped if it is an atomic inline such as an image or inline-block.
...And 4 more matches
HTML documentation index - HTML: Hypertext Markup Language
89 <details>: the details disclosure element disclosure
box, disclosure widget, element, html, html interactive elements, reference, web, details the html details element (<details>) creates a disclosure widget in which information is visible only when the widget is toggled into an "open" state.
... 91 <dialog>: the dialog element dialog, element, html, html interactive elements, reference, web, polyfill the html <dialog> element represents a dialog
box or other interactive component, such as a dismissable alert, inspector, or subwindow.
... 120 <input type="check
box"> element, html, html forms, input, input types, reference, check
box, form <input> elements of type check
box are rendered by default as
boxes that are checked (ticked) when activated, like you might see in an official government paper form.
...And 4 more matches
patternContentUnits - SVG: Scalable Vector Graphics
note: that this attribute has no effect if attribute view
box is specified on the <pattern> element.
... only one element is using this attribute: <pattern> html,body,svg { height:100% } <svg view
box="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <!-- a pattern tile that content coordinates and values are computed against the current coordinate user space.
... note that the size of the tile is computed against the bounding
box of the target element --> <pattern id="p1" width="20%" height="20%" patterncontentunits="userspaceonuse"> <circle cx="10" cy="10" r="10" /> </pattern> <!-- a pattern tile that content coordinates and values are computed against the bounding
box of the target element.
...And 4 more matches
transform - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg view
box="-40 0 150 100" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <g fill="grey" transform="rotate(-10 50 100) translate(-36 45.5) skewx(40) scale(1 0.5)"> <path id="heart" d="m 10,30 a 20,20 0,0,1 50,30 a 20,20 0,0,1 90,30 q 90,60 50,90 q 10,60 10,30 z" /> </g> <use xlink:href="#heart" fill="none" stroke="red"/> </svg> note: as of svg2, transform is a presentation attribute, meaning it can be used as a css property.
...ys}} \\ 1 \end{pmatrix} = \begin{pmatrix} a & c & e \\ b & d & f \\ 0 & 0 & 1 \end{pmatrix} \begin{pmatrix} x_{\mathrm{prevcoordsys}} \\ y_{\mathrm{prevcoordsys}} \\ 1 \end{pmatrix} = \begin{pmatrix} a x_{\mathrm{prevcoordsys}} + c y_{\mathrm{prevcoordsys}} + e \\ b x_{\mathrm{prevcoordsys}} + d y_{\mathrm{prevcoordsys}} + f \\ 1 \end{pmatrix} example html,body,svg { height:100% } <svg view
box="0 0 200 200" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="30" height="20" fill="green" /> <!-- in the following example we are applying the matrix: [a c e] [3 -1 30] [b d f] => [1 3 40] [0 0 1] [0 0 1] which transform the rectangle as such: top left corner: oldx=10 oldy=10 newx = a * oldx + c * oldy + e = 3 * 10 - 1 * 10 + 30 = 50 newy = b * oldx...
... in other words: xnew = xold + <x> ynew = yold + <y> example html,body,svg { height:100% } <svg view
box="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- no translation --> <rect x="5" y="5" width="40" height="40" fill="green" /> <!-- horizontal translation --> <rect x="5" y="5" width="40" height="40" fill="blue" transform="translate(50)" /> <!-- vertical translation --> <rect x="5" y="5" width="40" height="40" fill="red" transform="translate(0 50)" /> <!-- bot...
...And 4 more matches
panel - Archive of obsolete content
// the message payload is the contents of the edit
box.
... var textarea = document.getelementbyid("edit-
box"); textarea.addeventlistener('keyup', function onkeyup(event) { if (event.keycode == 13) { // remove the newline.
...self.port.on("show", function onshow() { textarea.focus(); }); finally, the "text-entry.html" file defines the <textarea> element: <html> <head> <style type="text/css" media="all"> textarea { margin: 10px; } body { background-color: gray; } </style> </head> <body> <textarea rows="13" cols="33" id="edit-
box"></textarea> </body> </html> finally, save these three icon files to the "data" directory: icon-16.png icon-32.png icon-64.png to learn much more about content scripts, see the working with content scripts guide.
...And 3 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
within the window are a label element and text
box element, wrapped in a h
box element so that they are arranged horizontally.
... listing 5: content for clock.xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/"?> <dialog id="clockdialog" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="clock" buttons="accept" onload="initclock();"> <script type="application/javascript" src="chrome://helloworld/content/clock.js"/> <h
box align="center"> <label value="current time:" /> <text
box id="currenttime" /> </h
box> </dialog> listing 6: content for clock.js function initclock() { showcurrenttime(); window.setinterval(showcurrenttime, 1000); } function showcurrenttime() { var text
box = document.getelementbyid("currenttime"); text
box.value = new date().tolocaletimestring(); text
box.select(); } operations check perform an operations check to ma...
....xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/"?> <!doctype dialog system "chrome://helloworld/locale/clock.dtd"> <dialog id="clockdialog" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="&helloworld.clock;" buttons="accept" onload="initclock();"> <script type="application/javascript" src="chrome://helloworld/content/clock.js" /> <h
box align="center"> <label value="&helloworld.currenttime;:" /> <text
box id="currenttime" /> </h
box> </dialog> create the dtd that defines the entity references now create the dtd file that gets referred to by clock.xul (listing 9).
...And 3 more matches
Setting Up a Development Environment - Archive of obsolete content
in the "run" text
box you should type this: bash -c "make" or replace "make" with "make clean" for the clean command.
... in the "start in" text
box you should choose %p (directory path of active project).
... if you don't see this text
box, click on the "more" button.
...And 3 more matches
Enabling the behavior - updating the status periodically - Archive of obsolete content
now that we have code to retrieve tinder
box status and update the icon, we need to run it periodically.
... function loadtinder
boxstatus() { gxmlhttprequest = new xmlhttprequest(); gxmlhttprequest.onload = updatetinder
boxstatus; gxmlhttprequest.open("get", "http://tinder
box.mozilla.org/seamonkey/panel.html"); gxmlhttprequest.send(null); window.settimeout(loadtinder
boxstatus, 60000); } window.settimeout(loadtinder
boxstatus, 1000); window.settimeout schedules functions to run at some future time.
... we use it inside the loadtinder
boxstatus function to make that function run a second (1,000 milliseconds) after startup and a minute (60,000 milliseconds) after each invocation.
...And 3 more matches
Tamarin build documentation - Archive of obsolete content
download and build the asc source code using the subversion client $ svn co http://opensource.adobe.com/svn/open...
box/asc-redux/ asc $ cd asc/build/java $ ant ...
...heck the windows mobile shell is functioning by running $avm hello.abc (where hello.abc is a simple abc to print a string, or can substitute with any test abc) now any acceptance or performance tests can be run as on desktop using test/acceptance/runtests.py or tests/performance/runtests.py tamarin buildbot adobe maintains a continuous build and test system for tamarin redux, similar to tinder
box.
... tamarin buildbot tryserver the tryserver/sand
box is setup to allow users to push any code changes that they would like to have tested in the automated build/test process prior to actually pushing the changes.
...And 3 more matches
Actions - Archive of obsolete content
<v
box 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> <action> <button uri="?relateditem" label="?relateditem"/> </action> </template...
...> </v
box> in this example, we omit the <xul:rule> element around the <xul:action> as it is optional when we want to generate content unconditionally.
...after all the results have been examined, the dom tree will look like the following: <v
box 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> <action> <button uri="?relateditem" label="?relateditem"/> </action> </template...
...And 3 more matches
Multiple Queries - Archive of obsolete content
the following is the basic structure of a template with multiple queries: <list
box datasources="..." ref="..."> <queryset> <query> ...
... </rule> </queryset> </list
box> each queryset holds a query and its set of rules.
...here is an example using an rdf datasource: <h
box id="photoslist" datasources="template-guide-photos3.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> <template> <queryset> <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="canal"/> </query> <action> <button uri="?photo" image="?photo" label="view" orient="vertical"/> ...
...And 3 more matches
Adding Event Handlers - Archive of obsolete content
for example, when the mouse is moved over a button that is inside a
box, a 'mousemove' event is generated, and sent first to the window, followed by the document, and then the
box.
...finally, the bubbling phase causes the event to be sent to the
box, document and window.
...the command event is fired when a user activates an element, for example by pressing a button, changing a check
box or selecting an item from a menu.
...And 3 more matches
Cross Package Overlays - Archive of obsolete content
our foverlay.xul example source <?xml version="1.0"?> <overlay xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <tool
box id="browser-tool
box"> <toolbar id="findfile_toolbar"> <label control="findfile_filename" value="search for files named:"/> <text
box id="findfile_filename"/> <label control="findfile_dir" value="directory:"/> <text
box id="findfile_dir"/> <button label="browse..."/> </toolbar> </tool
box> </overlay> you can view this by changing the overlay to a window.
... the only thing that is special here is the id used on the tool
box.
... this value (browser-tool
box) is the same as the identifier of the tool
box in the browser window (navigator.xul).
...And 3 more matches
XUL Questions and Answers - Archive of obsolete content
is it possible to have check
box support for multi column lists?
... the current issue is a person exploring if it is possible to have check
box support for multi column lists.
... the following is the code they wrote: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="test-window" title="check list test" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul"> <list
box rows="4"> <listhead> <listheader label="multi-column"/> </listhead> <listcols> <listcol flex="1"/> </listcols> <listitem> <listcell type="check
box" value="1" label="vghkvghk"/> </listitem> <listitem> <listcell type="check
box" value="2" label="vghjkvk" checked="true"/> </listitem> <listitem> <listcell type="check
box" value="3" label="hukfzgjcfj" disabled="true"/> </listitem> </list
box> <list
box rows="4"> <listhead> <listheader label="single-column"/> ...
...And 3 more matches
listcols - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container for the columns of a list
box, each of which are created with the listcol element.
... there should be only one listcols element in a list
box.
... if there is no listcols element, the list
box has a single column.
...And 3 more matches
preference - Archive of obsolete content
you can connect a user interface element such as a check
box to a preference element using the user interface element's preference attribute.
...for instance, checking the check
box disables the preference instead of enabling it.
...a change event is fired in different ways for different xul input elements as listed below: onchange type: script code text
box when enter key is pressed radio/check
box when the state is changed select list when the selected item is changed what is accessible the script context at this point can only access the following things: global values/functions i.e.
...And 3 more matches
tabpanels - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a container to hold the set of pages in a tab
box.
... the tabpanels element should be placed in a tab
box although it does not have to be a direct child.
... the children of the tabpanels element become the panels of the tab
box.
...And 3 more matches
tabs - Archive of obsolete content
a tabs element should be placed inside a tab
box and should contain tab elements.
... attributes closebutton, disableclose, disabled, onclosetab, onnewtab, onselect, setfocus, selectedindex, tab
box, tabindex, tooltiptextnew, value, properties accessibletype, disabled, itemcount, selectedindex, selecteditem, tabindex, value, methods advanceselectedtab, appenditem, getindexofitem, getitematindex, insertitemat, removeitemat examples (example needed) attributes closebutton obsolete since gecko 1.9.2 type: boolean if this attribute is set to true, the tabs row will have a "new tab" button and "close" button on the ends.
...the list
box, richlist
box, radiogroup, etc., not the list item that was selected) when it is changed either via this property, the selectedindex property, or changed by the user.
...And 3 more matches
How to enable locale switching in a XULRunner application - Archive of obsolete content
i chose a list
box with a button.
...sample chrome/chrome.manifest content localeswitchdemo content/ locale localeswitchdemo de-de locale/de-de/ locale localeswitchdemo en-gb locale/en-gb/ locale localeswitchdemo fr-fr locale/fr-fr/ how are you going to populate the xul list
box?
...here is a code snippet showing how this is done: the definition of the xul control: <list
box id="locale-list
box"> <!-- generated list items go in here --> </list
box> <button label="&switchlocale.button;" oncommand="changelocale()"/> the javascript code to populate the control: try { // query available and selected locales var chromeregservice = components.classes["@mozilla.org/chrome/chrome-registry;1"].getservice(); var xulchromereg = chromeregservice.queryinterface(components.interfaces.nsixulchrom...
...And 3 more matches
Common Firefox theme issues and solutions - Archive of obsolete content
in order to work around this issue, you need to either rename any of the following files that are in your chrome://browser/skin/ folder and fix any references to those files, or copy them to the folder chrome://browser/skin/lion/: keyhole-circle.png toolbar.png toolbarbutton-dropmarker.png tabbrowser/alltabs-
box-bkgnd-icon.png tabview/tabview.png places/toolbar.png linux linux select
box fields are showing both drop arrow and spinner arrows on linux: the styling of drop down select
box fields may show both a drop arrow and up/down spinner arrows.
... address bar identity
box is missing padlock icons for secure sites in firefox 14 and later the identity
box has been significantly changed and the favicon has been replaced by an icon that indicates the website's status.
...the following css rules also need to be copied to the proper location in the browser.css file and modified as necessary: /* page proxy icon */ #page-proxy-favicon { width: 16px; height: 16px; margin: 1px 3px; list-style-image: url(chrome://browser/skin/identity-icons-generic.png); -moz-image-region: rect(0, 16px, 16px, 0); } .verifieddomain > #identity-
box-inner > #page-proxy-stack > #page-proxy-favicon { list-style-image: url(chrome://browser/skin/identity-icons-https.png); } .verifiedidentity > #identity-
box-inner > #page-proxy-stack > #page-proxy-favicon { list-style-image: url(chrome://browser/skin/identity-icons-https-ev.png); } #identity-
box:hover > #identity-
box-inner > #page-proxy-stack > #page-proxy-favicon { -moz-ima...
...And 3 more matches
Building up a basic demo with A-Frame - Game development
a-frame is built on top of webgl, and provides pre built components to use in applications — models, video players, sky
boxes, geometries, controls, animations, cursors, etc.
... note: an entity is any element — it can be an object like a
box, cylinder or cone, but it can also be a camera, light or sound source.
... let's create the scene by adding an <a-scene> element inside the <body> element: <a-scene> </a-scene> adding a cube adding the cube to the scene is done by adding a simple <a-
box> element inside the <a-scene> element.
...And 3 more matches
CSS building blocks - Learn web development
the sub-articles are as follows: type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the
box model everything in css has a
box around it, and understanding these
boxes is key to being able to create layouts with css, or to align items with other items.
... in this lesson, we will take a proper look at the css
box model, in order that you can move onto more complex layout tasks with an understanding of how it works and the terminology that relates to it.
...overflow is what happens when there is too much content to be contained comfortably inside a
box.
...And 3 more matches
Grids - Learn web development
prerequisites: html basics (study introduction to html), and an idea of how css works (study introduction to css and styling
boxes.) objective: to understand the fundamental concepts behind grid layout systems, and how to implement a grid layout using css grid.
...by default these display in normal flow so the
boxes display one below the other.
...as with flex
box, this switches on grid layout, and all of the direct children of the container become grid items.
...And 3 more matches
Beginner's guide to media queries - Learn web development
perhaps the line lengths become far too long, or a
boxed out sidebar gets squashed and hard to read.
... * {
box-sizing: border-
box; } body { width: 90%; margin: 2em auto; font: 1em/1.3 arial, helvetica, sans-serif; } a:link, a:visited { color: #333; } nav ul, aside ul { list-style: none; padding: 0; } nav a:link, nav a:visited { background-color: rgba(207, 232, 220, 0.2); border: 2px solid rgb(79, 185, 227); text-decoration: none; display: block; padding: 10p...
...we have also used flex
box to put the navigation into a row.
...And 3 more matches
Arrays - Learn web development
playable code <h2>live output</h2> <div class="output" style="min-height: 150px;"> <ul> </ul> <p></p> </div> <h2>editable code</h2> <p class="a11y-label">press esc to move focus away from the code area (tab inserts a tab character).</p> <textarea id="code" class="playable-code" style="height: 410px;width: 95%"> const list = document.queryselector('.output ul'); const total
box = document.queryselector('.output p'); let total = 0; list.innerhtml = ''; total
box.textcontent = ''; // number 1 'underpants:6.99' 'socks:5.99' 't-shirt:14.99' 'trousers:31.99' 'shoes:23.99'; for (let i = 0; i <= 0; i++) { // number 2 // number 3 // number 4 // number 5 let itemtext = 0; const listitem ...
...= document.createelement('li'); listitem.textcontent = itemtext; list.appendchild(listitem); } total
box.textcontent = 'total: $' + total.tofixed(2); </textarea> <div class="playable-buttons"> <input id="reset" type="button" value="reset"> <input id="solution" type="button" value="show solution"> </div> const textarea = document.getelementbyid('code'); const reset = document.getelementbyid('reset'); const solution = document.getelementbyid('solution'); let code = textarea.value; let userentry = textarea.value; function updatecode() { eval(textarea.value); } reset.addeventlistener('click', function() { textarea.value = code; userentry = textarea.value; solutionentry = jssolution; solution.value = 'show solution'; updatecode(); }); solution.addeventlistener('click', fu...
...nction() { if(solution.value === 'show solution') { textarea.value = solutionentry; solution.value = 'hide solution'; } else { textarea.value = userentry; solution.value = 'show solution'; } updatecode(); }); const jssolution = 'const list = document.queryselector(\'.output ul\');\nconst total
box = document.queryselector(\'.output p\');\nlet total = 0;\nlist.innerhtml = \'\';\ntotal
box.textcontent = \'\';\n\nlet products = [\'underpants:6.99\',\n \'socks:5.99\',\n \'t-shirt:14.99\',\n \'trousers:31.99\',\n \'shoes:23.99\'];\n\nfor(let i = 0; i < products.length; i++) {\n let subarray = products[i].split(\':\');\n let name = subarray[0];\n let price = number(subarray[1]);\n total += price;\n let itemtext = name + \' — $\' + price;\n\n let listitem = documen...
...And 3 more matches
Ember app structure and componentization - Learn web development
update the application.hbs file again so its content looks like this: <section class="todoapp"> <h1>todos</h1> <input class="new-todo" aria-label="what needs to be done?" placeholder="what needs to be done?" autofocus > <section class="main"> <input id="mark-all-complete" class="toggle-all" type="check
box"> <label for="mark-all-complete">mark all as complete</label> <ul class="todo-list"> <li> <div class="view"> <input aria-label="toggle the completion of this todo" class="toggle" type="check
box" > <label>buy movie tickets</label> <button type="button" class="destroy" ...
... title="remove this todo" ></button> </div> <input autofocus class="edit" value="todo text"> </li> <li> <div class="view"> <input aria-label="toggle the completion of this todo" class="toggle" type="check
box" > <label>go to movie</label> <button type="button" class="destroy" title="remove this todo" ></button> </div> <input autofocus class="edit" value="todo text"> </li> </ul> </section> <footer class="footer"> <span class="todo-count"> <strong>0</strong> todos left </span> <ul class="filters"> <li> <a href="#">all</a> <a href="#">active</a> ...
...the main input / "new-todo" (red in the image) the containing body of the todo list + the mark-all-complete button (purple in the image) the mark-all-complete button, explicitly highlighted for reasons given below (yellow in the image) each todo is an individual component (green in the image) the footer (blue in the image) something odd to note is that the mark-all-complete check
box (marked in yellow), while in the "main" section, is rendered next to the "new-todo" input.
...And 3 more matches
React interactivity: Events and state - Learn web development
update your <h2> like so: <h2 id="list-heading">{headingtext}</h2> completing a task you might notice that, when you click on a check
box, it checks and unchecks appropriately.
... as a feature of html, the browser knows how to remember which check
box inputs are checked or unchecked without our help.
... this feature hides a problem, however: toggling a check
box doesn't change the state in our react application.
...And 3 more matches
Handling common accessibility problems - Learn web development
html semantic html (where the elements are used for their correct purpose) is accessible right out of the
box — such content is readable by sighted viewers (provided you don't do anything silly like make the text way too small or hide it using css), but will also be usable by assistive technologies like screen readers (apps that literally read out a web page to their user), and confer other advantages too.
... safari doesn't allow you to tab through links by default; to enable this, you need to open safari's preferences, go to advanced, and check the press tab to highlight each item on a webpage check
box.
...for example, in our tabbed info
box example (see source code) we have three panels of information, but we are positioning them on top of one another and providing tabs that can be clicked to show each one (it is also keyboard accessible — you can alternatively use tab and enter/return to select them).
...And 3 more matches
How Mozilla's build system works
sand
box.py contains code for a generic python sand
box.
... reader.py contains the code that defines the moz.build sand
box (the mozbuildsand
box class) and the code for traversing a tree of moz.build files (the buildreader class) by following dirs and tiers variables.
... a buildreader is instantiated with a configuration, is told to read the source tree, and then emits a stream of mozbuildsand
box instances corresponding to the executed moz.build files.
...And 3 more matches
SpiderMonkey Internals
the representation is 64 bits and uses nan-
boxing on all platforms, although the exact nan-
boxing format depends on the platform.
... nan-
boxing is a technique based on the fact that in ieee-754 there are 2**53-2 different bit patterns that all represent nan.
...other values are encoded as a value and a type tag: on x86, arm, and similar 32-bit platforms, we use what we call "nun
boxing", in which non-double values are a 32-bit type tag and a 32-bit payload, which is normally either a pointer or a signed 32-bit integer.
...And 3 more matches
XPCOM Interface Reference
tionnsiauthmodulensiauthpromptnsiauthprompt2nsiauthpromptadapterfactorynsiauthpromptcallbacknsiauthpromptprovidernsiauthpromptwrappernsiautocompletecontrollernsiautocompleteinputnsiautocompleteitemnsiautocompletelistenernsiautocompleteobservernsiautocompleteresultnsiautocompletesearchnsibadcertlistener2nsibidikeyboardnsibinaryinputstreamnsibinaryoutputstreamnsiblocklistpromptnsiblocklistservicensi
boxobjectnsibrowser
boxobjectnsibrowserhistorynsibrowsersearchservicensicrlinfonsicrlmanagernsicachensicachedeviceinfonsicacheentrydescriptornsicacheentryinfonsicachelistenernsicachemetadatavisitornsicacheservicensicachesessionnsicachevisitornsicachingchannelnsicancelablensicategorymanagernsichannelnsichanneleventsinknsichannelpolicynsicharsetresolvernsichromeframemessagemanagernsichromeregistrynsicla...
...ssinfonsiclipboardnsiclipboardcommandsnsiclipboarddragdrophooklistnsiclipboarddragdrophooksnsiclipboardhelpernsiclipboardownernsicollectionnsicommandcontrollernsicommandlinensicommandlinehandlernsicommandlinerunnernsicomponentmanagernsicomponentregistrarnsicompositionstringsynthesizernsiconsolelistenernsiconsolemessagensiconsoleservicensicontainer
boxobjectnsicontentframemessagemanagernsicontentprefnsicontentprefcallback2nsicontentprefobservernsicontentprefservicensicontentprefservice2nsicontentsecuritypolicynsicontentsniffernsicontentviewnsicontentviewmanagernsicontentviewernsicontrollernsicontrollersnsiconverterinputstreamnsiconverteroutputstreamnsicookiensicookie2nsicookieacceptdialognsicookieconsentnsicookiemanagernsicookiemanager2nsicookiepermissionnsicookiepromptservicensicookieservicens...
...eratornsidirectoryservicensidirectoryserviceprovidernsidirectoryserviceprovider2nsidiskcachestreaminternalnsidispatchsupportnsidocshellnsidocumentloadernsidownloadnsidownloadhistorynsidownloadmanagernsidownloadmanageruinsidownloadobservernsidownloadprogresslistenernsidownloadernsidragdrophandlernsidragservicensidragsessionnsidroppedlinkhandlernsidroppedlinkitemnsidynamiccontainernsieditornsieditor
boxobjectnsieditordocshellnsieditorimesupportnsieditorloggingnsieditormailsupportnsieditorobservernsieditorspellchecknsieffectivetldservicensienumeratornsienvironmentnsierrorservicensieventlistenerinfonsieventlistenerservicensieventsourcensieventtargetnsiexceptionnsiextensionmanagernsiexternalhelperappservicensiexternalprotocolservicensiexternalurlhandlerservicensiftpchannelnsiftpeventsinknsifactoryn...
...And 3 more matches
Mail and RDF
msgaccounts:/ +-- http://home.netscape.com/nc-rdf#child --> | imap://alecf@imap.mywork.com | +-- http://home.netscape.com/nc-rdf#isserver --> "true" | +-- http://home.netscape.com/nc-rdf#child --> | imap://alecf@imap.mywork.com/in
box | +-- http://home.netscape.com/nc-rdf#totalmessages --> "4" | +-- http://home.netscape.com/nc-rdf#isserver --> "false" | +-- http://home.netscape.com/nc-rdf#messagechild --> | | imap_message://alecf@imap.mywork.com/in
box#1 | +-- http://home.netscape.com/nc-rdf#messagechild --> | | imap_message://alecf@imap.mywork.com/in
box#2 ...
...| +-- http://home.netscape.com/nc-rdf#messagechild --> | | imap_message://alecf@imap.mywork.com/in
box#3 | +-- http://home.netscape.com/nc-rdf#messagechild --> | imap_message://alecf@imap.mywork.com/in
box#4 | etc...
... +-- http://home.netscape.com/nc-rdf#child --> | mail
box://alecf@pop.mywork.com | +-- http://home.netscape.com/nc-rdf#isserver --> "true" | +-- http://home.netscape.com/nc-rdf#child --> | mail
box://alecf@pop.mywork.com/in
box | +-- http://home.netscape.com/nc-rdf#totalmessages --> "2" | +-- http://home.netscape.com/nc-rdf#isserver --> "false" | +-- http://home.netscape.com/nc-rdf#messagechild --> | | mail
box_message://alecf@pop.mywork.com/in
box#1 | +-- http://home.netscape.com/nc-rdf#messagechild --> | mail
box_message://alecf@pop.mywork.com/in
box#2 | etc...
...And 3 more matches
Network request list - Firefox Developer Tools
other actions you can take with request blocking: to turn all request blocking off or on: toggle the check
box next to enable request blocking.
... to turn a specific block off or on: toggle the check
box next to that item.
... url use the filter urls
box in the toolbar.
...And 3 more matches
Edit Shape Paths in CSS - Firefox Developer Tools
if the shape is clipped by the margin
box then the margin
box will make up part of this line.
... a dashed line demonstrates the outline of the shape which extends past the margin
box reference; this is the area that will be clipped by the margin
box.
... to understand the margin
box, and other
boxes used by css shapes see our guide to shapes from
box values.
...And 3 more matches
Examine and edit HTML - Firefox Developer Tools
searching the page inspector's search
box matches all markup in the current document and in any frames.
... to start searching the markup, click in the search
box to expand it or press ctrl + f , or cmd + f on a mac.
...clicking the marker enables the flex
box highlighter.
...And 3 more matches
UI Tour - Firefox Developer Tools
the select element button is one way you can select an element for inspection: note that it's actually part of the main tool
box toolbar, so it's immediately accessible from any tool, not just the inspector.
... layout view the layout view displays the
box model of the page.
... if the page includes any sections using either the flex
box display model or css grids, this view shows the flex
box or grid settings used on the page.
...And 3 more matches
Background Tasks API - Web APIs
this establishes a
box (id "container") that's used to present the progress of an operation (because you never know how long decoding "quantum filament tachyon emissions" will take, after all) as well as a second main
box (with the id "log
box"), which is used to display textual output.
...</p> <div class="container"> <div class="label">decoding quantum filament tachyon emissions...</div> <progress id="progress" value="0"></progress> <div class="button" id="startbutton"> start </div> <div class="label counter"> task <span id="currenttasknumber">0</span> of <span id="totaltaskcount">0</span> </div> </div> <div class="log
box"> <div class="logheader"> log </div> <div id="log"> </div> </div> the progress
box uses a <progress> element to show the progress, along with a label with sections that are changed to present numeric information about the progress.
... css content body { font-family: "open sans", "lucida grande", "arial", sans-serif; font-size: 16px; } .log
box { margin-top: 16px; width: 400px; height:500px; border-radius: 6px; border: 1px solid black;
box-shadow: 4px 4px 2px black; } .logheader { margin: 0; padding: 0 6px 4px; height: 22px; background-color: lightblue; border-bottom: 1px solid black; border-radius: 6px 6px 0 0; } #log { font: 12px "courier", monospace; padding: 6px; overflow: auto; overflow-y: scroll; width: 388px; height: 460px; } .container { width: 400px; padding: 6px; border-radius: 6px; border: 1px solid black;
box-shadow: 4px 4px ...
...And 3 more matches
Element.innerHTML - Web APIs
example this example uses innerhtml to create a mechanism for logging messages into a
box on a web page.
...then the message is appended to the
box with the class "log".
... we add a second method that logs information about mouseevent based events (such as mousedown, click, and mouseenter): function logevent(event) { var msg = "event <strong>" + event.type + "</strong> at <em>" + event.clientx + ", " + event.clienty + "</em>"; log(msg); } then we use this as the event handler for a number of mouse events on the
box that contains our log: var
boxelem = document.queryselector(".
box");
boxelem.addeventlistener("mousedown", logevent);
boxelem.addeventlistener("mouseup", logevent);
boxelem.addeventlistener("click", logevent);
boxelem.addeventlistener("mouseenter", logevent);
boxelem.addeventlistener("mouseleave", logevent); html the html is quite simple for our example.
...And 3 more matches
Event.preventDefault() - Web APIs
syntax event.preventdefault(); examples blocking default click handling toggling a check
box is the default action of clicking on a check
box.
... this example demonstrates how to prevent that from happening: javascript document.queryselector("#id-check
box").addeventlistener("click", function(event) { document.getelementbyid("output-
box").innerhtml += "sorry!
... <code>preventdefault()</code> won't let you check this!<br>"; event.preventdefault(); }, false); html <p>please click on the check
box control.</p> <form> <label for="id-check
box">check
box:</label> <input type="check
box" id="id-check
box"/> </form> <div id="output-
box"></div> result stopping keystrokes from reaching an edit field the following example demonstrates how invalid text input can be stopped from reaching the input field with preventdefault().
...And 3 more matches
Introduction to the File and Directory Entries API - Web APIs
you can develop apps that can read, write, and create files and directories in a sand
boxed, virtual file system.
... sample use cases the following are just a few examples of how you can use the file and directory entries api: apps with persistent uploader when a file or directory is selected for upload, you can copy the file into a local sand
box and upload a chunk at a time.
...irectory entries api has asynchronous and synchronous versions when using the asynchronous api, always use the error callbacks the file and directory entries api interacts with other apis the file and directory entries api is case-sensitive the file and directory entries api is a virtual representation of a file system the api doesn't give you access to the local file system, nor is the sand
box really a section of the file system.
...And 3 more matches
GlobalEventHandlers.ontransitioncancel - Web APIs
in addition, we also use a click event to make the
box dissappear (display: none;), showing how it triggers the transitioncancel event to fire.
... html this simply creates a <div> which we'll style with css below to make into a
box that resizes and changes color and such.
... <div class="
box"></div> css the css below styles the
box and applies a transition effect which makes the
box's color and size change, and causes the
box to rotate, while the mouse cursor hovers over it.
...And 3 more matches
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
it takes as input the rtcpeerconnection being tested, calls getstats() to get a new rtcstatsreport with current statistics, then computes the results it's looking for, outputting those results as appropriate to the user by appending appropriate html to the contents of the <div> element whose class is stats-
box.
... async function networkteststop(pc) { if (pc) { let stats
box = document.queryselector(".stats-
box"); let endreport = await pc.getstats(); for (let endremoteoutbound of endreport.values()) { if (endremoteoutbound.type === "remote-outbound-rtp") { let startremoteoutbound = startreport.get(endremoteoutbound.id); if (startremoteoutbound) { let startinboundstats = findreportentry(startreport, "remoteid", startremoteoutbound.id); let endinboundstats = findreportentry(endreport, "remoteid", endremoteoutbound.id); let elapsedtime = (endremoteoutbound.timestamp - startremoteoutbound.timestamp) / 1000; /* in seconds */ let packetssent = endremoteoutbound.packetssent - startremoteoutbound.packetssent; let bytess...
...framesdecoded} frames for a frame rate of ${framerate.tofixed(2)} fps.<br>`; } let logentry = `<div class="stats-entry"><h2>report id: ${endremoteoutbound.id}</h2>` + `remote peer sent ${packetssent} packets ${timestring}.<br>` + `${framestring}` + `data size: ${bytessent} bytes.</div>`; stats
box.innerhtml += logentry; } else { stats
box.innerhtml += `<div class="stats-error">unable to find initial statistics for id ${endremoteoutbound.id}.</div>` } } stats
box.scrollto(0, stats
box.scrollheight); } } } here's what's going on in the networkteststop() function: after calling the rtcpeerconnection method getstats() to get the latest statistics repo...
...And 3 more matches
SVGSVGElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,2...
...xt x="196" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgsvgelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svggraphicselement and also implements the ones from svgzoomandpan, svgfittoview
box, and windoweventhandlers.
... svgsvgelement.usecurrentview the initial view (i.e., before magnification and panning) of the current innermost svg document fragment can be either the "standard" view, i.e., based on attributes on the <svg> element such as view
box) or on a "custom" view (i.e., a hyperlink into a particular <view> or other element).
...And 3 more matches
SubtleCrypto.encrypt() - Web APIs
rsa-oaep this code fetches the contents of a text
box, encodes it for encryption, and encrypts it with using rsa-oaep.
... function getmessageencoding() { const message
box = document.queryselector(".rsa-oaep #message"); let message = message
box.value; let enc = new textencoder(); return enc.encode(message); } function encryptmessage(publickey) { let encoded = getmessageencoding(); return window.crypto.subtle.encrypt( { name: "rsa-oaep" }, publickey, encoded ); } aes-ctr this code fetches the contents of a text
box, encodes it for encryption, and encrypts it using aes in ctr mode.
... function getmessageencoding() { const message
box = document.queryselector(".aes-ctr #message"); let message = message
box.value; let enc = new textencoder(); return enc.encode(message); } function encryptmessage(key) { let encoded = getmessageencoding(); // counter will be needed for decryption counter = window.crypto.getrandomvalues(new uint8array(16)); return window.crypto.subtle.encrypt( { name: "aes-ctr", counter, length: 64 }, key, encoded ); } let iv = new uint8array(16); let key = new uint8array(16); let data = new uint8array(12345); //crypto functions are wrapped in promises so we have to use await and make sure the function that //contains this code is an async function //encrypt function wants a...
...And 3 more matches
Accessibility documentation index - Accessibility
these sections are frequently presented as sidebars or call-out
boxes.
... 57 aria: check
box role aria, accessibility, needscontent, role(2), rôle the check
box role is used for checkable interactive controls.
... elements containing role="check
box" must also include the aria-checked attribute to expose the check
box's state to assistive technology.
...And 3 more matches
:target - CSS: Cascading Style Sheets
isn't that delightful?</p> css p:target { background-color: gold; } /* add a pseudo-element inside the target element */ p:target::before { font: 70% sans-serif; content: "►"; color: limegreen; margin-right: .25em; } /* style italic elements within the target element */ p:target i { color: red; } result pure-css light
box you can use the :target pseudo-class to create a light
box without using any javascript.
... note: a more complete pure-css light
box based on the :target pseudo-class is available on github (demo).
... html <ul> <li><a href="#example1">open example #1</a></li> <li><a href="#example2">open example #2</a></li> </ul> <div class="light
box" id="example1"> <figure> <a href="#" class="close"></a> <figcaption>lorem ipsum dolor sit amet, consectetur adipiscing elit.
...And 3 more matches
Basic Concepts of Multicol - CSS: Cascading Style Sheets
multiple-column layout, usually referred to as multicol, is a specification for laying out content into a set of column
boxes much like columns in a newspaper.
...the columns are anonymous
boxes and described as column
boxes in the specification.
...the browser will then assign the correct amount of space to each column
box to create the requested number of columns.
...And 3 more matches
Center an element - CSS: Cascading Style Sheets
in this recipe you will see how to center one
box inside another.
... centering both horizontally and vertically was difficult before flex
box, with the
box alignment properties it is now straightforward.
... requirements to place an item into the center of another
box horizontally and vertically.
...And 3 more matches
WebKit CSS extensions - CSS: Cascading Style Sheets
order-before-color** -webkit-border-before-style** -webkit-border-before-width** -webkit-border-end** -webkit-border-end-color** -webkit-border-end-style** -webkit-border-end-width** -webkit-border-fit -webkit-border-horizontal-spacing -webkit-border-start** -webkit-border-start-color** -webkit-border-start-style** -webkit-border-start-width** -webkit-border-vertical-spacing -webkit-
box-align** -webkit-
box-direction** -webkit-
box-flex-group** -webkit-
box-flex** -webkit-
box-lines** -webkit-
box-ordinal-group** -webkit-
box-orient** -webkit-
box-pack** -webkit-
box-reflect** c -webkit-column-axis -webkit-column-break-after -webkit-column-break-before -webkit-column-break-inside -webkit-column-progression -webkit-cursor-visibility d-i -webkit-dashboard-region -w...
...ebkit-font-size-delta -webkit-font-smoothing -webkit-highlight -webkit-hyphenate-character -webkit-hyphenate-limit-after -webkit-hyphenate-limit-before -webkit-hyphenate-limit-lines -webkit-initial-letter l -webkit-line-align -webkit-line-
box-contain -webkit-line-clamp -webkit-line-grid -webkit-line-snap -webkit-locale -webkit-logical-height -webkit-logical-width m -webkit-margin-after-collapse -webkit-margin-after -webkit-margin-before-collapse -webkit-margin-before -webkit-margin-bottom-collapse -webkit-margin-collapse -webkit-margin-end** -webkit-margin-start** -webkit-margin-top-collapse -webkit-marquee-direction -webkit-marquee-increment -webkit-marquee-repetition -webkit-marquee-speed -webkit-marquee-style -webkit-marquee -webkit-mask-
box-image-out...
...set -webkit-mask-
box-image-repeat -webkit-mask-
box-image-slice -webkit-mask-
box-image-source -webkit-mask-
box-image-width -webkit-mask-
box-image -webkit-mask-repeat-x -webkit-mask-repeat-y -webkit-mask-source-type -webkit-max-logical-height -webkit-max-logical-width -webkit-min-logical-height -webkit-min-logical-width n -webkit-nbsp-mode p -webkit-padding-after** -webkit-padding-before** -webkit-padding-end** -webkit-padding-start** -webkit-perspective-origin-x -webkit-perspective-origin-y -webkit-print-color-adjust r-s -webkit-rtl-ordering -webkit-svg-shadow t -webkit-tap-highlight-color -webkit-text-combine -webkit-text-decoration-skip -webkit-text-decorations-in-effect -webkit-text-fill-color -webkit-text-security -webkit-text-stroke-color -web...
...And 3 more matches
background-origin - CSS: Cascading Style Sheets
syntax /* keyword values */ background-origin: border-
box; background-origin: padding-
box; background-origin: content-
box; /* global values */ background-origin: inherit; background-origin: initial; background-origin: unset; the background-origin property is specified as one of the keyword values listed below.
... values border-
box the background is positioned relative to the border
box.
... padding-
box the background is positioned relative to the padding
box.
...And 3 more matches
border-bottom-left-radius - CSS: Cascading Style Sheets
syntax /* the corner is a circle */ /* border-bottom-left-radius: radius */ border-bottom-left-radius: 3px; /* percentage values */ /* circle if
box is a square or ellipse if
box is a rectangle */ border-bottom-left-radius: 20%; /* same as above: 20% of horizontal(width) and vertical(height) */ border-bottom-left-radius: 20% 20%; /* 20% of horizontal(width) and 10% of vertical(height) */ border-bottom-left-radius: 20% 10%; /* the corner is an ellipse */ /* border-bottom-left-radius: horizontal vertical */ border-bottom-left-radius: 0.5em 1...
...percentages for the horizontal axis refer to the width of the
box, percentages for the vertical axis refer to the height of the
box.
...it also applies to ::first-letter.inheritednopercentagesrefer to the corresponding dimension of the border
boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples live example code .
...And 3 more matches
border-bottom-right-radius - CSS: Cascading Style Sheets
syntax /* the corner is a circle */ /* border-bottom-right-radius: radius */ border-bottom-right-radius: 3px; /* percentage values */ border-bottom-right-radius: 20%; /* corner of a circle if
box is a square or else corner of a rectangle */ border-bottom-right-radius: 20% 20%; /* same as above */ /* 20% of horizontal(width) and vertical(height) */ border-bottom-right-radius: 20% 10%; /* 20% of horizontal(width) and 10% of vertical(height) */ /*the corner is an ellipse */ /* border-bottom-right-radius: horizontal vertical */ border-bottom-right-radius: 0.5em 1em; border-bottom-right-radi...
...percentages for the horizontal axis refer to the width of the
box, percentages for the vertical axis refer to the height of the
box.
...it also applies to ::first-letter.inheritednopercentagesrefer to the corresponding dimension of the border
boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples live example code .
...And 3 more matches
caption-side - CSS: Cascading Style Sheets
values top the caption
box should be positioned above the table.
... bottom the caption
box should be positioned below the table.
... left the caption
box should be positioned on the left side of the table.
...And 3 more matches
min-width - CSS: Cascading Style Sheets
none no limit on the size of the
box.
...or the absolute lengthanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting minimum element width table { min-width: 75%; } form { min-width: 0; } specifications specification status comment css
box sizing module level 4the definition of 'min-width' in that specification.
... editor's draft css
box sizing module level 3the definition of 'min-width' in that specification.
...And 3 more matches
object-position - CSS: Cascading Style Sheets
the object-position css property specifies the alignment of the selected replaced element's contents within the element's
box.
... areas of the
box which aren't covered by the replaced element's object will show the element's background.
... you can adjust how the replaced element's object's intrinsic size (that is, its natural size) is adjusted to fit within the element's
box using the object-fit property.
...And 3 more matches
offset-path - CSS: Cascading Style Sheets
yntax /* default */ offset-path: none; /* function values */ offset-path: ray(45deg closest-side contain); /* url */ offset-path: url(#path); /* shapes */ offset-path: circle(50% at 25% 25%); offset-path: inset(50% 50% 50% 50%); offset-path: polygon(30% 0%, 70% 0%, 100% 50%, 30% 100%, 0% 70%, 0% 30%); offset-path: path('m 0,200 q 200,200 260,80 q 290,20 400,0 q 300,100 400,200'); /* geometry
boxes */ offset-path: margin-
box; offset-path: stroke-
box; /* global values */ offset-path: inherit; offset-path: initial; offset-path: unset; values ray() taking up to three values, defines a path that is a line segment starting from the position of the
box and proceeds in the direction defined by the specified angle similar to the css gradient angle where 0deg is up, with positive angles inc...
...] ) | <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'> ]?
...And 3 more matches
overflow-inline - CSS: Cascading Style Sheets
the overflow-inline css property sets what shows when content overflows the inline start and end edges of a
box.
... values visible content is not clipped and may be rendered outside the padding
box's inline start and end edges.
... hidden content is clipped if necessary to fit the inline dimension in the padding
box.
...And 3 more matches
overflow - CSS: Cascading Style Sheets
values visible content is not clipped and may be rendered outside the padding
box.
... hidden content is clipped if necessary to fit the padding
box.
... clip like for hidden, the content is clipped to the element's padding
box.
...And 3 more matches
overscroll-behavior-block - CSS: Cascading Style Sheets
formal definition initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing block overscrolling in this demo we have two block-level
boxes, one inside the other.
... the outer
box has a large height set on it so the page will scroll vertically.
... the inner
box has a small width (and height) set on it so it sits comforably inside the viewport, but its content is given a large height so it will also scroll vertically.
...And 3 more matches
overscroll-behavior-inline - CSS: Cascading Style Sheets
formal definition initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing inline overscrolling in this demo we have two block-level
boxes, one inside the other.
... the outer
box has a large width set on it so the page will scroll horizontally.
... the inner
box has a small width (and height) set on it so it sits comforably inside the viewport, but its content is given a large width so it will also scroll horizontally.
...And 3 more matches
white-space - CSS: Cascading Style Sheets
lines are broken as necessary to fill line
boxes.
...lines are broken at newline characters, at <br>, and as necessary to fill line
boxes.
...lines are broken at newline characters, at <br>, and as necessary to fill line
boxes.
...And 3 more matches
Block formatting context - Developer guides
it's the region in which the layout of block
boxes occurs and in which floats interact with other elements.
... html <section> <div class="
box"> <div class="float">i am a floated
box!</div> <p>i am content inside the container.</p> </div> </section> <section> <div class="
box" style="overflow:auto"> <div class="float">i am a floated
box!</div> <p>i am content inside the <code>overflow:auto</code> container.</p> </div> </section> <section> <div class="
box" style="display:flow-root"> ...
...<div class="float">i am a floated
box!</div> <p>i am content inside the <code>display:flow-root</code> container.</p> </div> </section> css section { height:150px; } .
box { background-color: rgb(224, 206, 247); border: 5px solid rebeccapurple; } .
box[style] { background-color: aliceblue; border: 5px solid steelblue; } .float { float: left; width: 200px; height: 100px; background-color: rgba(255, 255, 255, .5); border:1px solid black; padding: 10px; } exclude external floats in the following example, we are using display:flow-root and floats to implement double columns layout, beacuse an element in the normal flow that establishes a new bfc must not overlap the margin
box of any floats in the same block formatting context as the...
...And 3 more matches
stroke-linejoin - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following nine elements: <altglyph>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg view
box="0 0 18 12" xmlns="http://www.w3.org/2000/svg"> <!-- upper left path: effect of the "miter" value --> <path d="m1,5 a2,2 0,0,0 2,-3 a3,3 0 0 1 2,3.5" stroke="black" fill="none" stroke-linejoin="miter" /> <!-- center path: effect of the "round" value --> <path d="m7,5 a2,2 0,0,0 2,-3 a3,3 0 0 1 2,3.5" stroke="black" fill="none" stroke-linejoin="round" /> ...
... example html,body,svg { height:100% } <svg view
box="0 0 6 6" xmlns="http://www.w3.org/2000/svg"> <!-- effect of the "arcs" value --> <path d="m1,5 a2,2 0,0,0 2,-3 a3,3 0 0 1 2,3" stroke="black" fill="none" stroke-linejoin="arcs" /> <!-- the following pink lines highlight the position of the path for each stroke --> <g id="p"> <path d="m1,5 a2,2 0,0,0 2,-3 a3,3 0 0 1 2,3" stroke="pink" fill="none" stroke-width=...
... example html,body,svg { height:100% } <svg view
box="0 0 6 6" xmlns="http://www.w3.org/2000/svg"> <!-- effect of the "bevel" value --> <path d="m1,5 l2,-3 l2,3" stroke="black" fill="none" stroke-linejoin="bevel" /> <!-- the following pink lines highlight the position of the path for each stroke --> <g id="p"> <path d="m1,5 l2,-3 l2,3" stroke="pink" fill="none" stroke-width="0.025" /> <circle cx="1" cy="5" r="0.05" fill="pink" /> <circle cx="3" cy="2" r="0.05" fill="pink" /> ...
...And 3 more matches
<feComposite> - SVG: Scalable Vector Graphics
example svg <svg width="330" height="195" view
box="0 0 1100 650" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>example fecomposite - examples of fecomposite operations</title> <desc>four rows of six pairs of overlapping triangles depicting the six different fecomposite operators under different opacity values and different clearing of the background.</desc> <defs> ...
... the second set does not wipe out the background, with the result that the background sometimes shines through and is other cases is blended into itself (i.e., "double-counting").</desc> <filter id="overflood" filterunits="objectbounding
box" x="-5%" y="-5%" width="110%" height="110%"> <feflood flood-color="#ffffff" flood-opacity="1" result="flood"/> <fecomposite in="sourcegraphic" in2="backgroundimage" operator="over" result="comp"/> <femerge> <femergenode in="flood"/> <femergenode in="comp"/> </femerge> </filter> <filter id="inflood" filterunits="objectbounding
box" x="-5%" y="-5%" width="110%" height="110%...
..."> <feflood flood-color="#ffffff" flood-opacity="1" result="flood"/> <fecomposite in="sourcegraphic" in2="backgroundimage" operator="in" result="comp"/> <femerge> <femergenode in="flood"/> <femergenode in="comp"/> </femerge> </filter> <filter id="outflood" filterunits="objectbounding
box" x="-5%" y="-5%" width="110%" height="110%"> <feflood flood-color="#ffffff" flood-opacity="1" result="flood"/> <fecomposite in="sourcegraphic" in2="backgroundimage" operator="out" result="comp"/> <femerge> <femergenode in="flood"/> <femergenode in="comp"/> </femerge> </filter> <filter id="atopflood" filterunits="objectbounding
box" x="-5%" y="-5%" width="110%" height="110%"> <feflood flood-color="#ffffff" flood-opacity="1" result="flood"/> <fecompo...
...And 3 more matches
simple-prefs - Archive of obsolete content
type description example specification bool displayed as a check
box and stores a boolean.
... { "description": "does it have tentacles?", "type": "bool", "name": "hastentacles", "value": true, "title": "tentacles" } boolint displayed as a check
box and stores an integer.
... a boolint is presented to the user as a check
box, but instead of storing true or false, the "on" or "off" check
box states are mapped to integers using "on" or "off" properties in the specification.
...And 2 more matches
List of Mozilla-Based Applications - Archive of obsolete content
its monitoring package astyle css editor editing tool atmail webmail client aviva for java mainframe connectivity product uses mozilla rhino babelgum internet tv service basilisk pre-servo xul-based web browser uses most of the firefox 55 source code batik java-based toolkit uses mozilla rhino bit
box security focused browser seemingly based on firefox blackbird browser for african american community bluegriffon wysiwyg editor next generation version of composer buzzbird twitter client built on xulrunner camino browser 2.5m downloads and ~400,000 active users ...
... unofficial bug-fix release of nvu kylo video browser uses gecko biofortis labmatrix web-accessible software application used for information management and integration of patient clinical, specimen, genetic and molecular assay data based on xul liaison groupware client for novell’s email and collaboration server previously called mozngw lin
box kiosk browser (fr) web browser dedicated browser for french prefecture and town hall litl internet computer for home uses spidermonkey and gecko lizilayers gis application 3liz also creates some gis firefox add-ons logitech harmony remote software software for remote control device uses gre or xulrunner longman dictionary of contemporary...
...and distributed computing uses mozilla rhino phloneme publishing tool for vocab collab phped php editor embedded mozilla browser in product pidgin im client uses nss plain old webserver extension and standalone webserver 5,000 users and 30,000 downloads poe::xul framework for remote xul application in poe post
box email client started as a fork of thunderbird printgroove jt suite print process software uses xulrunner and spidermonkey prism (was webrunner) single-site browser xulrunner application pro/engineer wildfire cadcam product psycrunner chat, messenger, multicast toolkit about 1,000 users – xulrunner version of psyczilla extension ...
...And 2 more matches
Table Layout Regression Tests - Archive of obsolete content
writing regression data to e:\moz_src\mozilla\layout\html\tests\table\core\verify\standards1.rgd comparing to regression data from e:\moz_src\mozilla\layout\html\tests\table\core\baseline\standards1.rgd frame b
box mismatch: 0,26437,4824,600 vs.
...ft: 1[0x1]enum top: 1[0x1]enum right: 1[0x1]enum bottom: 1[0x1]enum left: null top: null right: null bottom: null left: null top: null right: null bottom: null 1[0x1]enum 0|1 1 [none]|left: auto top: auto right: auto bottom: auto auto 0[0x0]tw null auto 0[0x0]tw null 0 auto |0 0 0 normal normal 0[0x0]tw normal |0 8 1,000000 0 0 0 0 0 0 0 0 0 0 0 [none]|0 0 0 -1 1 |0 0 0 null frame b
box mismatch: 0,0,4824,600 vs.
...ft: 1[0x1]enum top: 1[0x1]enum right: 1[0x1]enum bottom: 1[0x1]enum left: null top: null right: null bottom: null left: null top: null right: null bottom: null 1[0x1]enum 0|1 1 [none]|left: auto top: auto right: auto bottom: auto auto 0[0x0]tw null auto 0[0x0]tw null 2 auto |0 0 0 normal normal 0[0x0]tw normal |0 8 1,000000 0 0 0 0 0 0 0 0 0 0 0 [none]|0 0 0 -1 1 |0 0 0 null frame b
box mismatch: 24,24,4776,552 vs.
...And 2 more matches
Namespaces - Archive of obsolete content
even if they did accidentally choose it, they may not define the same elements as xul anyway (e.g., <text
box/>) in their schema/dtd.
...for example, <xul:text
box/> uses a namespace named "xul" and a local name "text
box".
... this distinguishes it from, for example, <foobar:text
box/> which might occur in the same document.
...And 2 more matches
ContextMenus - Archive of obsolete content
<h
box id="container" align="center" oncontextmenu="..."> <label value="name:"/> <text
box id="name"/> </h
box> in this example, an attempt to open a context menu anywhere inside the h
box will call the event listener attached using the oncontextmenu attribute.
... as text
boxes have a context menu built in, the event will fire before an attempt to open the context menu.
... function checkcontextmenu(event) { if (event.target.localname == "text
box") event.preventdefault(); } function init() { var container = document.getelementbyid("container"); container.addeventlistener("contextmenu", checkcontextmenu, true); } the 'checkcontextmenu' function checks to see if the text
box was the target of the context menu and, if so, cancels the event using the preventdefault method.
...And 2 more matches
Menus - Archive of obsolete content
this type of menu would be used when you want to have a set of commands yet don't want to use a menu bar, for example in a dialog
box.
...other user interfaces call this type of widget a combo
box.
... for details about creating check
box menu items or radio menu items see check
box menu items or radio menu items.
...And 2 more matches
Recursive Generation - Archive of obsolete content
for the top level generation the parent insertion point is the element with the datasources attribute, in this example a <v
box>.
...here is the content that was generated after one iteration: <v
box 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> <action> <h
box uri="?relateditem"> <button label="?start"/> <button label="?relateditem"/> </h
box> </action> </template> <h
box id="http://www.xulplanet.com/rdf/b"> <button label="http://www.xulplanet.com/rdf/a"/> <button label="http://www.xulplanet.com/rdf/b"/> </h
box> <h
box id="http://www.xulplanet.com/rdf/c"> ...
...<button label="http://www.xulplanet.com/rdf/a"/> <button label="http://www.xulplanet.com/rdf/c"/> </h
box> <h
box id="http://www.xulplanet.com/rdf/d"> <button label="http://www.xulplanet.com/rdf/a"/> <button label="http://www.xulplanet.com/rdf/d"/> </h
box> </v
box> for the next iteration, the insertion point will be the three <h
box> elements.
...And 2 more matches
Sorting Results - Archive of obsolete content
<list
box datasources="people2.xml" ref="*" querytype="xml" sort="?name" sortdirection="ascending"> <template> <query expr="*/*"/> <action> <listitem uri="?" label="?name"/> </action> </template> </list
box> it will often be the case that multiple items have the same value, especially for larger amounts of data.
...for rdf datasources, you can also use an rdf predicate for sorting instead of a variable: <h
box datasources="template-guide-photos5.rdf" sort="http://purl.org/dc/elements/1.1/title" sortdirection="ascending" ref="http://www.xulplanet.com/rdf/myphotos"> <template> <v
box class="
box-padded" uri="rdf:*"> <image src="rdf:*"/> <label value="rdf:http://purl.org/dc/elements/1.1/title"/> </v
box> </template> </h
box> in this example, the generated items will ...
...changing the sort to change the sorting for a template's generated contents, you can either change the sort related attributes and rebuild the template, or you can call the sort method of the sort service: var list
box = document.getelementbyid("alist
box"); var sortservice = components.classes["@mozilla.org/xul/xul-sort-service;1"].
...And 2 more matches
Stack Positioning - Archive of obsolete content
they may be any element, including
boxes and other stacks.
...if you tried to move elements in a regular
box, other elements might shuffle their positions around.
... in this example, the resulting width of the top-most h
box will be 400px: <stack width="600"> <h
box flex="1"> <!-- content --> </h
box> <h
box left="0" right="200" > <!-- some content here.
...And 2 more matches
XUL Reference - Archive of obsolete content
« xul reference « alphabetical list of all xul elements action arrowscroll
box assign b
box binding bindings
box broadcaster broadcasterset button browser check
box caption clicktoscroll colorpicker column columns commandset command conditions content datepicker deck description dialog dialogheader dropmarker editor grid grippy group
box h
box iframe image key keyset label list
box listcell listcol listcols listhead listheader listitem member menu menubar menuitem menulist menupopup menuseparator notification notification
box observes overlay page panel param popupset preference preferences prefpane prefwindow progressmeter query queryset radio radiogroup resizer richlist
box richlistitem row rows rule scale scr...
...ipt scrollbar scroll
box scrollcorner separator spacer spinbuttons splitter stack statusbar statusbarpanel stringbundle stringbundleset tab tabbrowser (firefox-only starting with firefox 3/gecko 1.9) tab
box tabpanel tabpanels tabs template textnode text
box text
box (firefox autocomplete) text
box (mozilla autocomplete) timepicker titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring tool
box tooltip tree treecell treechildren treecol treecols treeitem treerow treeseparator triple v
box where window wizard wizardpage categorical list of all xul elements « xul reference « windows window wizard wizardpage titlebar window structure --- menus and popups ...
... --- toolbars toolbar toolbarbutton toolbargrippy toolbaritem toolbarpallete toolbarseperator toolbarspring tabs and grouping tab tab
box tabpanel tabpanels tabs controls --- text and images label caption image lists --- trees --- layout --- templates --- scripting --- helper elements other xul lists dialog overlay page window wizard wizardpage preference preferences prefpane prefwindow browser tabbrowser editor iframe titlebar resizer statusbar statusbarpanel dialogheader notification notification
box menubar menu menuitem menuseparator menupopup panel tooltip popupset toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer t...
...And 2 more matches
label - Archive of obsolete content
attributes accesskey, control, crop, disabled, href, value properties accesskey, accessibletype, control, crop, disabled, value style classes header, indent, monospace, plain, small-margin, text-link examples <label value="email address" control="email"/> <text
box id="email"/> attributes accesskey type: character this should be set to a character that is used as a shortcut key.
...if the
box direction is reversed, the cropping is reversed.
...for text
box and user editable menulist elements, the contents, as visible to the user, are read and set using the text
box.value and menulist.value syntax.
...And 2 more matches
listcell - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a single cell of a list
box.
... by default it only contains text but iconic and check
box listcells are also available.
...if the
box direction is reversed, the cropping is reversed.
...And 2 more matches
tooltip - Archive of obsolete content
attributes crop, default, label, noautohide, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, page, position properties accessibletype, label, popup
boxobject, position, state methods hidepopup, moveto, openpopup, openpopupatscreen, showpopup, sizeto examples <tooltip id="moretip" orient="vertical" style="background-color: #33dd00;"> <label value="click here to see more information"/> <label value="really!" style="color: red;"/> </tooltip> <v
box> <button label="simple" tooltiptext="a simple popup"/> <button label="more" too...
...ltip="moretip"/> </v
box> attributes crop type: one of the values below if the label of the element is too big to fit in its given space, the text will be cropped on the side specified by the crop attribute.
...if the
box direction is reversed, the cropping is reversed.
...And 2 more matches
Gecko Compatibility Handbook - Archive of obsolete content
once you filled the dialog
box (it should look like the screenshot below), click ok and close theoptions dialog.
... internet explorer implements the
box model (padding, margins, borders) incorrectly.
...use only cross-browser
box specifications for margins, padding and borders.
...And 2 more matches
-ms-scrollbar-face-color - Archive of obsolete content
the -ms-scrollbar-face-color css property is a microsoft extension that specifies the color of the scroll
box and scroll arrows of a scroll bar.
... initial valuethreedfaceapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the scroll
box and scroll arrows.
...)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples this example uses -ms-scrollbar-face-color and -ms-scrollbar-arrow-color to display a scroll bar with a blue scroll
box and arrows, and a scroll bar with a green scroll
box and arrows.
...And 2 more matches
CSS - Archive of obsolete content
roperty is a microsoft extension specifying the maximum number of consecutive lines in an element that may be ended with a hyphenated word.-ms-hyphenate-limit-zonethe -ms-hyphenate-limit-zone css property is a microsoft extension specifying the width of the hyphenation zone.-ms-ime-alignthe -ms-ime-align css property is a microsoft extension aligning the input method editor (ime) candidate window
box relative to the element on which the ime composition is active.
...l-snap-type and -ms-scroll-snap-points-y properties.-ms-scroll-translationthe -ms-scroll-translation css property is a microsoft extension that specifies whether vertical-to-horizontal scroll wheel translation occurs on the specified element.-ms-scrollbar-3dlight-colorthe -ms-scrollbar-3dlight-color css property is a microsoft extension specifying the color of the top and left edges of the scroll
box and scroll arrows of a scroll bar.-ms-scrollbar-arrow-colorthe -ms-scrollbar-arrow-color css property is a microsoft extension that specifies the color of the arrow elements of a scroll arrow.-ms-scrollbar-base-colorthe -ms-scrollbar-base-color css property is a microsoft extension that specifies the base color of the main elements of a scroll bar.-ms-scrollbar-darkshadow-colorthe -ms-scrollbar-d...
...arkshadow-color css property is a microsoft extension that specifies the color of a scroll bar's gutter.-ms-scrollbar-face-colorthe -ms-scrollbar-face-color css property is a microsoft extension that specifies the color of the scroll
box and scroll arrows of a scroll bar.-ms-scrollbar-highlight-colorthe -ms-scrollbar-highlight-color css property is a microsoft extension that specifies the color of the slider tray, the top and left edges of the scroll
box, and the scroll arrows of a scroll bar.-ms-scrollbar-shadow-colorthe -ms-scrollbar-shadow-color css property is a microsoft extension that specifies the color of the bottom and right edges of the scroll
box and scroll arrows of a scroll bar.-ms-scrollbar-track-colorthe -ms-scrollbar-track-color css property is a microsoft extension that speci...
...And 2 more matches
RDF in Fifty Words or Less - Archive of obsolete content
say that one of my bookmark "folders" is really a pointer to my email in
box: when i open that folder, voilà!
...the in
box "folder" was really just a pointer to an internet resource that contains more rdf that extends the graph.
... that "internet resource" was a uri that pointed to a cgi script (say, http://www.mozilla.org/smart-mail/get-mail.cgi?user=waterson&folder=in
box).
...And 2 more matches
Building up a basic demo with Three.js - Game development
let's start, by defining the geometry for a cube shape, adding the following just above the render() function: var
boxgeometry = new three.
boxgeometry(10, 10, 10); in this case, we define a simple cube that is 10 x 10 x 10 units.
...in our case, we will choose a simple blue color to paint our
box.
...this takes on a shape, and adds the specified material to every face: var cube = new three.mesh(
boxgeometry, basicmaterial); again, add this line below the one you previously added.
...And 2 more matches
Desktop gamepad controls - Game development
x
box 360 or ps3) should be suitable for web implementations.
... on for storing the controller info and the pressed buttons: var controller = {}; var buttonspressed = []; function gamepadhandler(e) { controller = e.gamepad; output.innerhtml = "gamepad: " + controller.id; } the second line in the gamepadhandler function shows up on the screen when the device is connected: we can also show the id of the device — in the case above we're using the x
box 360 wireless controller.
...the d-pad right button have an index of 3 on the wireless x
box 360, but may have a different one on another device.
...And 2 more matches
Alignment subject - MDN Web Docs Glossary: Definitions of Web-related terms
in css
box alignment the alignment subject is the thing (or things) being aligned by the property.
... for justify-self and align-self, the alignment subject is the margin
box of the
box the property is set on, using the writing mode of that
box.
... for justify-content and align-content, the writing mode of the
box is also used.
...And 2 more matches
Attribute selectors - Learn web development
for example, if you had classes of
box-warning and
box-error and wanted to match everything that started with the string "
box-", you could use [class^="
box-"] to select them both (or [class|="
box"] as described in section above).
... selector example description [attr^=value] li[class^="
box-"] matches elements with an attr attribute (whose name is the value in square brackets), whose value begins with value.
... [attr$=value] li[class$="-
box"] matches elements with an attr attribute whose value ends with value.
...And 2 more matches
Use CSS to solve common problems - Learn web development
ow 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?
... how to create fancy
boxes (also see the styling
boxes module, generally).
... how to use background-clip to control how much of the
box your background image covers.
...And 2 more matches
Fundamental text and font styling - Learn web development
as you'll have already experienced in your work with html and css, text inside an element is laid out inside the element's content
box.
...once it reaches the end, it goes down to the next line and continues, then the next line, until all the content has been placed in the
box.
... note: if the above paragraph leaves you feeling confused, then no matter — go back and review our
box model article, to brush up on the
box model theory, before carrying on.
...And 2 more matches
What are browser developer tools? - Learn web development
if you can't see the develop menu, go to safari ➤ preferences ➤ advanced, and check the show develop menu in menu bar check
box.
... click the check
boxes next to each declaration to see what would happen if you removed the declaration.
... click a property name or value to bring up a text
box, where you can key in a new value to get a live preview of a style change.
...And 2 more matches
Styling web forms - Learn web development
multi-line <textarea>s buttons (both <input> and <button>s) <label> <output> the bad some elements are more difficult to style, requiring more complex css or some more specific tricks: check
boxes and radio buttons <input type="search"> we describe how to handle these more specific features in the article advanced form styling.
...
box sizing all text fields have complete support for every property related to the css
box model, such as width, height, padding, margin, and border.
...to give the same size to several different widgets, you can use the
box-sizing property along with some consistent values for other properties: input, textarea, select, button { width : 150px; padding: 0; margin: 0;
box-sizing: border-
box; } in the screenshot below, the left column shows the default rendering of an <input type="radio">, <input type="check
box">, <input type="range">, <input type="text">, <input type="date"> input, <select>, <textarea>,<input...
...And 2 more matches
Storing the information you need — Variables - Learn web development
the first line pops a
box up on the screen that asks the reader to enter their name, and then stores the value in a variable.
...you can think of them being like little cardboard
boxes that you can store things in.
...in the
box analogy you saw above, not existing would mean there's no
box (variable) for a value to go in.
...And 2 more matches
Componentizing our React app - Learn web development
go back to src/app.js, copy the first <li> from inside the unordered list, and paste it into todo.js so that it reads like this: export default function todo() { return ( <li classname="todo stack-small"> <div classname="c-cb"> <input id="todo-0" type="check
box" defaultchecked={true} /> <label classname="todo-label" htmlfor="todo-0"> eat </label> </div> <div classname="btn-group"> <button type="button" classname="btn"> edit <span classname="visually-hidden">eat</span> </button> <button type="button" classname="btn btn__danger"> delete <span classname="visually-hidden">eat<...
... putting all that together, your todo() function should read like this: export default function todo(props) { return ( <li classname="todo stack-small"> <div classname="c-cb"> <input id="todo-0" type="check
box" defaultchecked={true} /> <label classname="todo-label" htmlfor="todo-0"> {props.name} </label> </div> <div classname="btn-group"> <button type="button" classname="btn"> edit <span classname="visually-hidden">{props.name}</span> </button> <button type="button" classname="btn btn__danger"> delete <span classname="vis...
...once you’re done, the todo component's <input /> element will read like this: <input id="todo-0" type="check
box" defaultchecked={props.completed} /> and your browser should update to show only eat being checked: if you change each <todo /> component’s completed prop, your browser will check or uncheck the equivalent rendered check
boxes accordingly.
...And 2 more matches
Using Vue computed properties - Learn web development
tracking changes to "done" we can use events to capture the check
box update and manage our list accordingly.
... since we're not relying on a button press to trigger the change, we can attach a @change event handler to each check
box instead of using v-model.
... <input type="check
box" class="check
box" :id="id" :checked="isdone" @change="$emit('check
box-changed')" /> since all we need to do is emit that the check
box was checked, we can include the $emit() inline.
...And 2 more matches
Debugging on Windows
enable it by going its configuration menu in "debug > other debugging targets > child process debugging settings", and ticking the
box.
...you will get a dialog
box asking if you would like to debug.
...to set the environment variable for visual studio, use project > properties > debugging > environment and click the little
box.
...And 2 more matches
Eclipse CDT Manual Setup
faq: wait, why does eclipse need an object directory?) code assistance out of the
box, eclipse can provide some code assistance for the mozilla source, but it will be incomplete and often just plain broken.
...since eclipse doesn't initially have any of this information, the code assistance that it's able to provide out of the
box is pretty broken.
...(if an "indexing" item starts after the "refreshing the workspace" item has finished, click the little red
box beside that item to cancel it, since we want to configure the project before the indexer runs.) initial project properties so that the indexer will run faster and give better results, and so that eclipse doesn't give results for irrelevant files, you should add some resource filters to have eclipse ignore certain non-source files and directories.
...And 2 more matches
Firefox UI considerations for web developers
firefox's top sites
box in this article, we take a look at how to influence the appearance of your site in firefox user interface elements such as the top sites
box.
... top sites the top sites
box lists a user-configurable number of rows of icons serving as quick links to sites the user commonly visits, or that the user has chosen to pin to the top sites list in order to have quick access to them.
... examples consider again the example top sites
box shown at the top of the page, repeated below: let's look at some examples among the icons shown here (note that this discussion is based on the site designs as of early january, 2019).
...And 2 more matches
Embedding the editor
editor incorrectly rooted the editor in a composer window is current owned by the nseditorshell, which in turn is created, owned and destroyed by the nseditor
boxobject.
... the
box object is a layout structure that is owned by content nodes, and survives frame destruction/recreation.
... the
box object also has a reference to the docshell for the editor frame.
...And 2 more matches
How to get a stacktrace with WinDbg
you should now see a "command" text window with debug output at the top and an input
box at the bottom.
... before debugging can start, several commands must be entered into the one-line input
box at the bottom of the command window.
... tip: all commands must be entered exactly as written, one line at a time, into the bottom of the command
box.
...And 2 more matches
CustomizableUI.jsm
id getlocalizedproperty(awidget, aprop, aformatargs, adef); void hidepanelfornode(anode); bool isspecialwidget(awidgetid); void addpanelcloselisteners(apanel); void removepanelcloselisteners(apanel); void onwidgetdrag(awidgetid, aarea); void notifystartcustomizing(awindow); void notifyendcustomizing(awindow); void dispatchtool
boxevent(aevent, adetails, awindow); bool isareaoverflowable(aareaid); void settoolbarvisibility(atoolbarid, aisvisible); string getplaceforitem(aelement); bool isbuiltintoolbar(atoolbarid); methods addlistener() add a listener object that will get fired for various events regarding customization.
...nb: only works on the customizable toolbars generated by the tool
box itself.
... parameters awindow the window exiting customize mode dispatchtool
boxevent() notify tool
box(es) of a particular event.
...And 2 more matches
GC and CC logs
(the gc log will be the same size in either case.) with multiprocess firefox, you can't record logs from the content process, due to sand
boxing.
... you'll need to disable sand
boxing by setting moz_disable_content_sand
box=t when you run firefox.
... from the commandline tldr: if you just want shutdown gc/cc logs to debug leaks that happen in our automated tests, you probably want something along the lines of: moz_disable_content_sand
box=t moz_cc_log_directory=/full/path/to/log/directory/ moz_cc_log_shutdown=1 moz_cc_all_traces=shutdown ./mach ...
...And 2 more matches
Profiling with the Firefox Profiler
one of the easiest ways to find slowness caused by a page's js is to type its url into the "filter stacks"
box.
... tip: if things are blank elsewhere in the ui, you may have text entered into the "filter stacks"
box.
...it's only collected if the "stack walk" check
box in the gecko profiler add-on's settings is checked.
...And 2 more matches
Leak And Bloat Tests
results printed on tinder
box output, these consist of: mail rlk reference count leaks mail lk total bytes malloc'ed and not free'd mail mh maximum heap size mail a allocations - number of calls to malloc and friends.
... 08/04/2008: prefs.js created via tb with the above settings, the first section is for preferences included in tinder
box, the second section is ones which don't currently get set.
... user_pref("mail.account.account1.server", "server1"); user_pref("mail.account.account2.identities", "id1"); user_pref("mail.account.account2.server", "server2"); user_pref("mail.accountmanager.accounts", "account1,account2"); user_pref("mail.accountmanager.defaultaccount", "account2"); user_pref("mail.accountmanager.localfoldersserver", "server1"); user_pref("mail.identity.id1.fullname", "tinder
box"); user_pref("mail.identity.id1.smtpserver", "smtp1"); user_pref("mail.identity.id1.useremail", "tinder
box@invalid.com"); user_pref("mail.identity.id1.valid", true); user_pref("mail.root.none-rel", "[profd]mail"); user_pref("mail.root.pop3-rel", "[profd]mail"); user_pref("mail.server.server1.directory-rel", "[profd]mail/local folders"); user_pref("mail.server.server1.hostname", "local folders"); u...
...And 2 more matches
Rhino Debugger
this action will display a file-selection dialog
box prompting you for the location of a script to load.
...this action will display a file-selection dialog
box prompting you for the location of a script to execute.
... break to stop all running scripts and give control to the debugger you may do any of the following: select the debug->break menu item on the menu bar press the break button on the toolbar press the pause/break key on the keyboard break on exceptions to give control to the debugger whenever a javascript is exception is thrown select the debug->break on exceptions check
box from the menu bar.
...And 2 more matches
IAccessibleComponent
the origin of the parent coordinate system is the upper left corner of the parent's bounding
box.
...locationinparent() returns the location of the upper left corner of the object's bounding
box relative to the immediate parent object.
... the coordinates of the bounding
box are given relative to the parent's coordinate system.
...And 2 more matches
mozIRegistry
some are for illustrative purposes (the lighter-colored
boxes near the top of the picture).
...i'll talk about them to provide examples of how you should use the other
boxes.
... these components (indicated by the darker-colored
boxes) are the services you'll be using.
...And 2 more matches
nsIAuthPrompt
text the text of the prompt message dialog
box.
...one of the save_password_* constants defaulttext the default text for the text input dialog
box.
... result the result of the dialog
box, ok or cancel buttons.
...And 2 more matches
nsITreeView
wstring action); void performactiononcell(in wstring action, in long row, in nsitreecolumn col); void performactiononrow(in wstring action, in long row); void selectionchanged(); void setcelltext(in long row, in nsitreecolumn col, in astring value); void setcellvalue(in long row, in nsitreecolumn col, in astring value); void settree(in nsitree
boxobject tree); void toggleopenstate(in long index); attributes attribute type description rowcount long the total number of rows in the tree (including the offscreen rows).
...for very simple tree views, such as those without multi-level data, you might want to consider using something simpler than a tree view, such as a list
box.
... settree() called when setting or clearing the view on the tree to link the view to or disconnect the front end
box object.
...And 2 more matches
Frequently Asked Questions
interface pointers considered harmful by don
box originally appeared in the september 1995 issue of "the c++ report".
... com smart pointers even more harmful by don
box is a follow-up article that originally appeared in the february 1996 issue of "the c++ report".
... books essential com by don
box.
...And 2 more matches
Using js-ctypes
components.utils.import("resource://gre/modules/ctypes.jsm"); var lib = ctypes.open("c:\\windows\\system32\\user32.dll"); /* declare the signature of the function we are going to call */ var msg
box = lib.declare("message
boxw", ctypes.winapi_abi, ctypes.int32_t, ctypes.int32_t, ctypes.jschar.ptr, ctypes.jschar.ptr, ctypes.int32_t); var mb_ok = 0; var ret = msg
box(0, "hello world", "title", mb_ok); lib.close(); in line 3, the user32.dll syste...
...line 6 declares msg
box() to be a method that calls the windows function message
boxw.
... line 15 calls the msg
box() routine, which displays the alert.
...And 2 more matches
DOM Inspector internals - Firefox Developer Tools
rowseroverlay.xul commandoverlay.xul editingoverlay.xul flasher.js hooks.js inspector.css inspector.js inspectoroverlay.xul inspector.xml inspector.xul keysetoverlay.xul object.js object.xul popupoverlay.xul sidebar.js sidebar.xul statusbaroverlay.xul tasksoverlay-cz.xul tasksoverlay-ff.xul tasksoverlay-mobile.xul tasksoverlay-sb.xul tasksoverlay-tb.xul tasksoverlay.xul tool
boxoverlay.xul utils.js venkmanoverlay.xul viewerregistry.js overlays you will notice that there are a lot of overlays.
...as of this writing, there's a tool
box containing an empty menubar and an empty toolbar, as well as an empty v
box: <tool
box id="tbxinstool
box"> <menubar id="mbrinspectormain"/> <toolbar id="tbinspectorprimary"/> </tool
box> <v
box id="bxinspectormain" flex="1"/> there are no menus, toolbar items, et cetera defined here.
...here's the expanded, host-agnostic overlay tree for inspector.xul: chrome://inspector/content/inspector.xul chrome://inspector/content/inspectoroverlay.xul chrome://inspector/content/tool
boxoverlay.xul chrome://inspector/content/popupoverlay.xul chrome://inspector/content/editingoverlay.xul chrome://inspector/content/viewers/d...pupoverlay.xul chrome://inspector/content/viewers/s...pupoverlay.xul chrome://inspector/content/commandoverlay.xul chrome://inspector/content/viewers/d...andoverlay.xul chrome://inspector/content/keyset...
...And 2 more matches
Browser Console - Firefox Developer Tools
if you also want to use the other web developer tools in the regular web tool
box with add-on or browser code, consider using the browser tool
box.
...to enable it set the devtools.chrome.enabled preference to true in about:config, or set the "enable browser chrome and add-on debugging tool
boxes" (firefox 40 and later) option in the developer tool settings.
...the messages from scripts in all the opened pages) by setting or clearing the check
box labeled show content messages.
...And 2 more matches
Migrating from Firebug - Firefox Developer Tools
in the devtools this option is called enable persistent logs and is available within the tool
box options panel.
...the devtools do not have a side panel like the command editor (which is requested in bug 1133849), but therefore has a separate tool called scratchpad, which can be added as panel to the tool
box or opened in a separate window via firefox menu > developer > scratchpad or shift + f4.
... inspect
box model in firebug the
box model can be inspected via the layout side panel.
...And 2 more matches
CSS Grid Inspector: Examine grid layouts - Firefox Developer Tools
grid options the grid section of the layout view looks like this: you'll see a number of options contained within: overlay grid: contains a check
box for each grid present on the page, along with various options.
... overlay grid each grid present on a page has an entry in the "overlay grid" section: each entry consists of (from left to right): a check
box allowing you to toggle the grid overlay for that grid on and off.
...when you select the check
box for the subgrid, the lines for the parent grid are displayed also displayed; if the check
box for the parent grid is unselected, then its lines are translucent.
...And 2 more matches
Storage Inspector - Firefox Developer Tools
the tool
box will appear at the bottom of the browser window, with the storage inspector activated.
... it's just called "storage" in the developer tool
box.
...you can hide and show columns by context-clicking on the table header and selecting the columns you want to see: search there's a search
box at the top of the table widget: this filters the table to show only items which match the search term.
...And 2 more matches
about:debugging (before Firefox 68) - Firefox Developer Tools
if the "debug" button is disabled, check the "enable add-on debugging"
box.
...checking the
box sets both preferences to true, and unchecking it sets them both to false.
... you can also modify the preferences directly in about:config, or by checking "enable browser chrome and add-on debugging tool
boxes" and "enable remote debugging" in the developer tools settings.
...And 2 more matches
CSSStyleDeclaration.setProperty() - Web APIs
if priority can be omitted, javascript has a special simpler syntax for setting a css property on a style declaration object: style.csspropertyname = 'value'; examples in this example we have three buttons, which can be pressed to dynamically alter our
box paragraph's border, background color, and text color to random values (see the live example at the end of this section).
...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.
...in each case, this is done with the setproperty() method, for example
boxpararule.style.setproperty('border', newborder); html <div class="controls"> <button class="border">border</button> <button class="bgcolor">background</button> <button class="color">text</button> </div> <div class="
box"> <p>
box</p> </div> css html { background: orange; font-family: sans-serif; height: 100%; } body { height: inherit; width: 80%; min-width: 500px; max-width: 1000px; margin: 0 auto; } .controls { display: flex; justify-content: space-around; align-items: center; } div button {...
...And 2 more matches
Element.getBoundingClientRect() - Web APIs
the element's size is equal to its width/height + padding + border-width in the case that the standard
box model is being used, or width/height only if
box-sizing: border-
box has been set on it.
... syntax domrect = element.getboundingclientrect(); value the returned value is a domrect object which is the union of the rectangles returned by getclientrects() for the element, i.e., the css border-
boxes associated with the element.
... the result is the smallest rectangle which contains the entire element, with read-only left, top, right, bottom, x, y, width, and height properties describing the overall border-
box in pixels.
...And 2 more matches
HTMLElement.offsetLeft - Web APIs
for block-level elements, offsettop, offsetleft, offsetwidth, and offsetheight describe the border
box of an element relative to the offsetparent.
... however, for inline-level elements (such as span) that can wrap from one line to the next, offsettop and offsetleft describe the positions of the first border
box (use element.getclientrects() to get its width and height), while offsetwidth and offsetheight describe the dimensions of the bounding border
box (use element.getboundingclientrect() to get its position).
... therefore, a
box with the left, top, width and height of offsetleft, offsettop, offsetwidth and offsetheight will not be a bounding
box for a span with wrapped text.
...And 2 more matches
HTMLImageElement.complete - Web APIs
examples consider a photo library app that provides the ability to open images into a light
box mode for improved viewing as well as editing of the image.
... but imagine that you have other code that needs to only run when the image has completed loading, such as a command that performs red-eye removal on the image in the light
box.
... so the fixredeyecommand() function, which is called by the button that triggers red-eye removal, checks the value of the light
box image's complete property before attempting to do its work.
...And 2 more matches
Ajax navigation example - Web APIs
ple</a> | <a class="ajax-nav" href="unexisting.php">unexisting page</a> ] </p> include/header.php: <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="js/ajax_nav.js"></script> <link rel="stylesheet" href="css/style.css" /> js/ajax_nav.js: "use strict"; const ajaxrequest = new (function () { function closereq () { oloading
box.parentnode && document.body.removechild(oloading
box); bisloading = false; } function abortreq () { if (!bisloading) { return; } oreq.abort(); closereq(); } function ajaxerror () { alert("unknown error."); } function ajaxload () { var vmsg, nstatus = this.status; switch (nstatus) { case 200: ...
...1)).replace(rendqstmark, ""); } function getpage (spage) { if (bisloading) { return; } oreq = new xmlhttprequest(); bisloading = true; oreq.onload = ajaxload; oreq.onerror = ajaxerror; if (spage) { opageinfo.url = filterurl(spage, null); } oreq.open("get", filterurl(opageinfo.url, "json"), true); oreq.send(); oloading
box.parentnode || document.body.appendchild(oloading
box); } function requestpage (surl) { if (history.pushstate) { bupdateurl = true; getpage(surl); } else { /* ajax navigation is not supported */ location.assign(surl); } } function processlink () { if (this.classname === sajaxclass) { reques...
...links.length; nidx < nlen; document.links[nidx++].onclick = processlink); } const /* customizable constants */ stargetid = "ajax-content", sviewkey = "view_as", sajaxclass = "ajax-nav", /* not customizable constants */ rsearch = /\?.*$/, rhost = /^[^\?]*\?*&*/, rview = new regexp("&" + sviewkey + "\\=[^&]*|&*$", "i"), rendqstmark = /\?$/, oloading
box = document.createelement("div"), ocover = document.createelement("div"), oloadingimg = new image(), opageinfo = { title: null, url: location.href }, ohttpstatus = /* http://www.iana.org/assignments/http-status-codes/http-status-codes.xml */ { 100: "continue", 101: "switching protocols", 102: "processing", 200:...
...And 2 more matches
IntersectionObserver.rootMargin - Web APIs
each side of the rectangle represented by rootmargin is added to the corresponding side in the root element's bounding
box before the intersection test is performed.
... this lets you, for example, adjust the bounds outward so that the target element is considered 100% visible even if a certain number of pixels worth of width or height is clipped away, or treat the target as partially hidden if an edge is too close to the edge of the root's bounding
box.
... see the root element and root margin in intersection observer api for a more in-depth look at the root margin and how it works with the root's bounding
box.
...And 2 more matches
Using the MediaStream Recording API - Web APIs
flex
box could be the answer here, but it's a bit overkill for such a simple layout.
... instead, the problem was solved by making the third container's height equal to 100% of the parent height, minus the heights and padding of the other two: .sound-clips {
box-shadow: inset 0 3px 4px rgba(0,0,0,0.7); background-color: rgba(0,0,0,0.1); height: calc(100% - 240px - 0.7rem); overflow: scroll; } note: calc() has good support across modern browsers too, even going back to internet explorer 9.
... check
box hack for showing/hiding this is fairly well documented already, but we thought we'd give a mention to the check
box hack, which abuses the fact that you can click on the <label> of a check
box to toggle it checked/unchecked.
...And 2 more matches
ResizeObserverEntry.contentRect - Web APIs
note that this is better supported than resizeobserverentry.border
boxsize or resizeobserverentry.content
boxsize, but it is left over from an earlier implementation of the resize observer api, is still included in the spec for web compat reasons, and may be deprecated in future versions.
... if the target is an html element, the returned contentrect is the element's content
box.
... if the target is an svgelement, the returned contentrect is the svg's bounding
box.
...And 2 more matches
Resize Observer API - Web APIs
the resize observer api provides a solution to exactly these kinds of problems, and more besides, allowing you to easily observe and respond to changes in the size of an element’s content or border
box in a performant way.
... examples you find a couple of simple examples on our github repo: resize-observer-border-radius.html (see source): a simple example with a green
box, sized as a percentage of the viewport size.
... when the viewport size is changed, the
box's rounded corners change in proportion to the size of the
box.
...And 2 more matches
Using the Web Audio API - Web APIs
we'll briefly look at some concepts, then study a simple boom
box example that allows us to load an audio track, play and pause it, and change its volume and stereo panning.
... example code our boom
box looks like this: note the retro cassette deck with a play button, and vol and pan sliders to allow you to alter the volume and stereo panning.
...let's begin with a simple method — as we have a boom
box, we most likely want to play a full song track.
...And 2 more matches
Window.showModalDialog() - Web APIs
the window.showmodaldialog() created and displayed a modal dialog
box containing a specified html document.
... dialogheight: height the height of the dialog
box in pixels.
... dialogleft: left distance of the dialog
box from the left edge of the desktop.
...And 2 more matches
Text labels and names - Accessibility
see also <area> h24: providing text alternatives for the area elements of image maps dialogs should be labeled for any container whose contents act as a dialog
box (for example, a modal dialog asking the user to make a choice or respond to an action being taken), give it a descriptive label or name, so that assistive technology users can easily discover what its purpose is.
... a dialog
box is generally denoted by an aria role="dialog" or role="alertdialog"; you can use the aria-label or aria-labelledby attributes to provide a label.
... examples the following example shows a simple dialog
box, defined as such using role="dialog" and labelled using aria-labelledby.
...And 2 more matches
-moz-float-edge - CSS: Cascading Style Sheets
/* keyword values */ -moz-float-edge: border-
box; -moz-float-edge: content-
box; -moz-float-edge: margin-
box; -moz-float-edge: padding-
box; /* global values */ -moz-float-edge: inherit; -moz-float-edge: initial; -moz-float-edge: unset; syntax values border-
box the height and width properties include the content, padding and border but not the margin.
... content-
box the height and width properties include the content, but not the padding, border or margin.
... margin-
box the height and width properties include the content, padding, border and margin.
...And 2 more matches
Styling Columns - CSS: Cascading Style Sheets
as column
boxes created inside multicol containers are anonymous
boxes, there is little we can do to style them.
... can i style the column
boxes?
...the anonymous
boxes that make up your columns can’t be targeted in any way, meaning it isn’t possible to change a
box's background color or have one column larger than the others.
...And 2 more matches
CSS Containment - CSS: Cascading Style Sheets
by using contain: layout you can tell the browser it only needs to check this element — everything inside the element is scoped to that element and does not affect the rest of the page, and the containing
box establishes an independent formatting context.
... the containing
box creates a stacking context, therefore z-index can be used.
... paint containment article { contain: paint; } paint containment essentially clips the
box to the padding edge of the principal
box.
...And 2 more matches
Flow Layout and Writing Modes - CSS: Cascading Style Sheets
the block flow direction is the direction in which
boxes, for example paragraphs, stack in that writing mode.
...
boxes with a different writing mode to their parent when a nested
box is assigned a different writing mode to its parent, then an inline level
box will display as if it has display: inline-block.
... a block-level
box will establish a new block formatting context, meaning that if its inner display type would be flow, it will get a computed display type of flow-root.
...And 2 more matches
Using CSS gradients - CSS: Cascading Style Sheets
<div class="multiposition-stops"></div> <div class="multiposition-stop2"></div> div { width: 120px; height: 120px; float: left; margin-right: 10px;
box-sizing: border-
box; } .multiposition-stops { background: linear-gradient(to left, lime 20%, red 30%, red 45%, cyan 55%, cyan 70%, yellow 80% ); background: linear-gradient(to left, lime 20%, red 30% 45%, cyan 55% 70%, yellow 80% ); } .multiposition-stop2 { background: linear-gradient(to left, lime 25%, red 25%, red 50%, cyan 50%, cyan 75%, yellow 75% ); backgroun...
...the second example does not contain the hint to hilight the difference the color hint can make: <div class="colorhint-gradient"></div> <div class="regular-progression"></div> div { width: 120px; height: 120px; float: left; margin-right: 10px;
box-sizing: border-
box; } .colorhint-gradient { background: linear-gradient(to top, black, 20%, cyan); } .regular-progression { background: linear-gradient(to top, black, cyan); } overlaying gradients gradients support transparency, so you can stack multiple backgrounds to achieve some pretty fancy effects.
...by default, the center of the gradient is at the 50% 50% mark, and the gradient is elliptical matching the aspect ratio of it's
box: <div class="simple-radial"></div> div { width: 240px; height: 120px; } .simple-radial { background: radial-gradient(red, blue); } positioning radial color stops again like linear gradients, you can position each radial color stop with a percentage or absolute length.
...And 2 more matches
Logical properties for floating and positioning - CSS: Cascading Style Sheets
in the example below i have two
boxes — the first has the
box floated with float: left, the second with float: inline-start.
... if you change the writing-mode to vertical-rl or the direction to rtl you will see that the left-floated
box always sticks to the left, whereas the inline-start-floated item follows the direction and writing-mode.
... in the below example i have used the inset-block-start and inset-inline-end properties to position the blue
box using absolute positioning inside the area with the grey dotted border, which has position: relative.
...And 2 more matches
CSS Overflow - CSS: Cascading Style Sheets
in css overflow happens when the content of a
box extends past one or more of the
box's edges.
...this is the overflow of painting effects which do not affect layout or otherwise extend the scrollable overflow region, such as
box shadows, border images, text decoration, overhanging glyphs, outlines, etc.
...this is the content appearing outside of the
box for which scrolling mechanisms need to be provided.
...And 2 more matches
Replaced elements - CSS: Cascading Style Sheets
the only other impact css can have on a replaced element is that there are properties which support controlling the positioning of the element's content within its
box.
... see controlling object position within the content
box for further information.
... controlling object position within the content
box certain css properties can be used to specify how the object contained within the replaced element should be positioned within the element's
box area.
...And 2 more matches
align-content - CSS: Cascading Style Sheets
the css align-content property sets the distribution of space between and around content items along a flex
box's cross-axis or a grid's block axis.
... baseline first baseline last baseline specifies participation in first- or last-baseline alignment: aligns the alignment baseline of the
box’s first or last baseline set with the corresponding baseline in the shared first or last baseline set of all the
boxes in its baseline-sharing group.
...ch<overflow-position> = unsafe | safe<content-position> = center | start | end | flex-start | flex-end examples css #container { height:200px; width: 240px; align-content: center; /* can be changed in the live sample */ background-color: #8c8c8c; } .flex { display: flex; flex-wrap: wrap; } .grid { display: grid; grid-template-columns: repeat(auto-fill, 50px); } div > div {
box-sizing: border-
box; border: 2px solid #8c8c8c; width: 50px; display: flex; align-items: center; justify-content: center; } #item1 { background-color: #8cffa0; min-height: 30px; } #item2 { background-color: #a0c8ff; min-height: 50px; } #item3 { background-color: #ffa08c; min-height: 40px; } #item4 { background-color: #ffff8c; min-height: 60px; } #item5 { background...
...And 2 more matches
column-gap (grid-column-gap) - CSS: Cascading Style Sheets
now specified in
box alignment, it may be used in multi-column, flexible
box, and grid layouts.
...ainers, grid containersinheritednopercentagesrefer to corresponding dimension of the content areacomputed valueas specified, with <length>s made absolute, and normal computing to zero except on multi-column elementsanimation typea length, percentage or calc(); formal syntax normal | <length-percentage>where <length-percentage> = <length> | <percentage> examples flex layout html <div id="flex
box"> <div></div> <div></div> <div></div> </div> css #flex
box { display: flex; height: 100px; column-gap: 20px; } #flex
box > div { border: 1px solid green; background-color: lime; flex: auto; } result grid layout html <div id="grid"> <div></div> <div></div> <div></div> </div> css #grid { grid-column-gap: 20px; } #grid { display: grid; height: 100px; gri...
...d-template-columns: repeat(3, 1fr); grid-template-rows: 100px; column-gap: 20px; } #grid > div { border: 1px solid green; background-color: lime; } result multi-column layout html <p class="content-
box"> this is some multi-column text with a 40px column gap created with the css `column-gap` property.
...And 2 more matches
justify-content - CSS: Cascading Style Sheets
the alignment is done after the lengths and auto margins are applied, meaning that, if in a flex
box layout there is at least one flexible element, with flex-grow different from 0, it will have no effect as there won't be any available space.
... baseline first baseline last baseline specifies participation in first- or last-baseline alignment: aligns the alignment baseline of the
box’s first or last baseline set with the corresponding baseline in the shared first or last baseline set of all the
boxes in its baseline-sharing group.
... note: stretch is not supported by flexible
boxes (flex
box).
...And 2 more matches
line-height-step - CSS: Cascading Style Sheets
the line-height-step css property sets the step unit for line
box heights.
... when the property is set, line
box heights are rounded up to the closest multiple of the unit.
... values <length> the specified <length> is used in the calculation of the line
box height step.
...And 2 more matches
max-width - CSS: Cascading Style Sheets
none no limit on the size of the
box.
... </div> </div> css #parent { background: lightblue; width: 300px; } #child { background: gold; width: 100%; max-width: 150px; } result specifications specification status comment css
box sizing module level 4the definition of 'max-width' in that specification.
... editor's draft css
box sizing module level 3the definition of 'max-width' in that specification.
...And 2 more matches
overscroll-behavior-x - CSS: Cascading Style Sheets
formal definition initial valueautoapplies tonon-replaced block-level elements and non-replaced inline-block elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax contain | none | auto examples preventing an underlying element from scrolling horizontally in our simple overscroll-behavior-x example (see source code also), we have two block-level
boxes, one inside the other.
... the outer
box has a large width set on it so the page will scroll horizontally.
... the inner
box has a small width (and height) set on it so it sits comforably inside the viewport, but its content is given a large width so it will scroll horizontally.
...And 2 more matches
position - CSS: Cascading Style Sheets
the margins of absolutely positioned
boxes do not collapse with other margins.
... html <div class="
box" id="one">one</div> <div class="
box" id="two">two</div> <div class="
box" id="three">three</div> <div class="
box" id="four">four</div> css .
box { display: inline-block; width: 100px; height: 100px; background: red; color: white; } #two { position: relative; top: 20px; left: 20px; background: blue; } absolute positioning elements that are relatively positioned remain in t...
...in the example below,
box "one" is fixed at 80 pixels from the top of the page and 10 pixels from the left.
...And 2 more matches
scroll-snap-align - CSS: Cascading Style Sheets
the scroll-snap-align property specifies the
box’s snap position as an alignment of its snap area (as the alignment subject) within its snap container’s snapport (as the alignment container).
... syntax /* keyword values */ scroll-snap-align: none; scroll-snap-align: start end; /* when two values set first is block, second inline */ scroll-snap-align: center; /* global values */ scroll-snap-align: inherit; scroll-snap-align: initial; scroll-snap-align: unset; values none the
box does not define a snap position in that axis.
... start the start alignment of this
box's scroll snap area, within the scroll container's snapport is a snap position in this axis.
...And 2 more matches
text-align - CSS: Cascading Style Sheets
the text-align css property sets the horizontal alignment of a block element or table-cell
box.
... left the inline contents are aligned to the left edge of the line
box.
... right the inline contents are aligned to the right edge of the line
box.
...And 2 more matches
text-overflow - CSS: Cascading Style Sheets
for example: overflow: hidden; white-space: nowrap; the text-overflow property only affects content that is overflowing a block container element in its inline progression direction (not text overflowing at the bottom of a
box, for example).
... fade this keyword clips the overflowing inline content and applies a fade-out effect near the edge of the line
box with complete transparency at the edge.
... fade( <length> | <percentage> ) this function clips the overflowing inline content and applies a fade-out effect near the edge of the line
box with complete transparency at the edge.
...And 2 more matches
<input type="search"> - HTML: Hypertext Markup Language
as the user edits the value of the field, the user agent sends search events to the htmlinputelement object representing the search
box.
... physical input element size the physical size of the input
box can be controlled using the size attribute.
... with it, you can specify the number of characters the input
box can display at a time.
...And 2 more matches
<menuitem> - HTML: Hypertext Markup Language
commands can also optionally include a check
box or be grouped to share radio buttons.
... (menu items for indirect commands gain check
boxes or radio buttons when defined against elements <input type="check
box"> and <input type="radio">.) content categories none.
...may only be used when the type attribute is check
box or radio.
...And 2 more matches
<select>: The HTML Select element - HTML: Hypertext Markup Language
when multiple is specified, most browsers will show a scrolling list
box instead of a single line dropdown.
... size if the control is presented as a scrolling list
box (e.g.
...browsers are not required to present a select element as a scrolled list
box.
...And 2 more matches
The building blocks of responsive design - Progressive web apps (PWAs)
border-
box sizing the padding does not affect the overall width and height of the containers because we have set the
box-sizing of all elements to border-
box: *, *:before, *:after { -webkit-
box-sizing: border-
box; -moz-
box-sizing: border-
box;
box-sizing: border-
box; } this basically means that width and height will now set the dimensions of an element all the way up to and including the border, not...
...so if you set width: 40%, the
box width will always be 40% of its parent, and any padding and border widths set on the
box will be subtracted from the content width, not added to it.
...read more about this at * {
box-sizing: border-
box } ftw, by paul irish.
...And 2 more matches
begin - SVG: Scalable Vector Graphics
examples offset example <svg width="120" height="120" view
box="0 0 120 120" xmlns="http://www.w3.org/2000/svg" version="1.1"> <!-- animated rectangles --> <rect x="10" y="35" height="15" width="0"> <animate attributetype="xml" attributename="width" to="100" begin="0s" dur="8s" fill="freeze" /> </rect> <rect x="35" y="60" height="15" width="0"> <animate attributetype="xml" attributename...
...stroke-width=".5" /> <text x="110" y="20" text-anchor="middle">8s</text> <line x1="110" y1="25" x2="110" y2="105" stroke="grey" stroke-width=".5" /> <line x1="10" y1="30" x2="110" y2="30" stroke="grey" stroke-width=".5" /> <line x1="10" y1="105" x2="110" y2="105" stroke="grey" stroke-width=".5" /> </svg> begin-1-offset.svg syncbase example <svg width="120" height="120" view
box="0 0 120 120" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- animated rectangles --> <rect x="10" y="35" height="15" width="0"> <animate attributetype="xml" attributename="width" to="50" id="first" begin="0s;third.end" dur="4s" /> </rect> <rect x="60" y="60" height="15" width="0"> <anim...
... stroke-width=".5" /> <text x="110" y="20" text-anchor="middle">8s</text> <line x1="110" y1="25" x2="110" y2="105" stroke="grey" stroke-width=".5" /> <line x1="10" y1="30" x2="110" y2="30" stroke="grey" stroke-width=".5" /> <line x1="10" y1="105" x2="110" y2="105" stroke="grey" stroke-width=".5" /> </svg> begin-2-syncbase.svg event example <svg width="120" height="120" view
box="0 0 120 120" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- animated rectangle --> <rect x="10" y="35" height="15" width="0"> <animate attributetype="xml" attributename="width" from="0" to="100" begin="startbutton.click" dur="8s" fill="freeze" /> </rect> <!-- trigger --> <...
...And 2 more matches
clipPathUnits - SVG: Scalable Vector Graphics
only one element is using this attribute: <clippath> html,body,svg { height:100% } <svg view
box="0 0 100 100"> <clippath id="myclip1" clippathunits="userspaceonuse"> <circle cx="50" cy="50" r="35" /> </clippath> <clippath id="myclip2" clippathunits="objectbounding
box"> <circle cx=".5" cy=".5" r=".35" /> </clippath> <!-- some reference rect to materialized to clip path --> <rect id="r1" x="0" y="0" width="45" height="45" /> <rect id="r2" x="0" y="55" width="45" height="45" /> <rect id="r3" x="55" y="55" width="45" height="45" /> <rect id="r4" x="55" y="0" width="45" height="45" /> <!-- the first 3 rect are clipped with usespaceonuse units --...
...> <use clip-path="url(#myclip1)" xlink:href="#r1" fill="red" /> <use clip-path="url(#myclip1)" xlink:href="#r2" fill="red" /> <use clip-path="url(#myclip1)" xlink:href="#r3" fill="red" /> <!-- the last rect is clipped with objectbounding
box units --> <use clip-path="url(#myclip2)" xlink:href="#r4" fill="red" /> </svg> clippath for <clippath>, clippathunits define the coordinate system in use for the content of the element.
... value userspaceonuse | objectbounding
box default value userspaceonuse animatable yes userspaceonuse this value indicates that all coordinates inside the <clippath> element refer to the user coordinate system as defined when the clipping path was created.
...And 2 more matches
display - SVG: Scalable Vector Graphics
it has implications for the <tspan>, <tref>, and <altglyph> elements, event processing, for bounding
box calculations and for calculation of clipping paths: if display is set to none on a <tspan>, <tref>, or <altglyph> element, then the text string is ignored for the purposes of text layout.
... the geometry of a graphics element with display set to none is not included in bounding
box and clipping paths calculations.
... html, body, svg { height: 100%; } <svg view
box="0 0 220 100" xmlns="http://www.w3.org/2000/svg"> <!-- here the yellow rectangle is displayed --> <rect x="0" y="0" width="100" height="100" fill="skyblue"></rect> <rect x="20" y="20" width="60" height="60" fill="yellow"></rect> <!-- here the yellow rectangle is not displayed --> <rect x="120" y="0" width="100" height="100" fill="skyblue"></rect> <rect x="140" y="20" width="60" heigh...
...And 2 more matches
dominant-baseline - SVG: Scalable Vector Graphics
the dominant-baseline attribute specifies the dominant baseline, which is the baseline used to align the
box’s text and inline-level contents.
... it also indicates the default alignment baseline of any
boxes participating in baseline alignment in the
box’s alignment context.
... as a presentation attribute, it can be applied to any element but it only has effect on the text content elements, including: <altglyph>, <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } text { font: bold 14px verdana, helvetica, arial, sans-serif; } <svg view
box="0 0 200 120" xmlns="http://www.w3.org/2000/svg"> <path d="m20,20 l180,20 m20,50 l180,50 m20,80 l180,80" stroke="grey" /> <text dominant-baseline="baseline" x="30" y="20">baseline</text> <text dominant-baseline="middle" x="30" y="50">middle</text> <text dominant-baseline="hanging" x="30" y="80">hanging</text> </svg> usage notes value auto | text-bottom | alphabet...
...And 2 more matches
maskContentUnits - SVG: Scalable Vector Graphics
only one element is using this attribute: <mask> html,body,svg { height:100% } <svg view
box="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <mask id="mymask1" maskcontentunits="userspaceonuse"> <rect fill="black" x="0" y="0" width="100%" height="100%" /> <circle fill="white" cx="50" cy="50" r="35" /> </mask> <mask id="mymask2" maskcontentunits="objectbounding
box"> <rect fill="black" x="0" y="0" width="100%" height="100%" /> <circle fill="white" cx=".5" cy=".5" r=".35" /> </mask> <!-- some reference rect to materialized the mask --> <rect id="r1" x="0" y="0" width="45" height="45" /> <rect id="r2" x="0" y="55" width="45" height="45" /> ...
...ct id="r3" x="55" y="55" width="45" height="45" /> <rect id="r4" x="55" y="0" width="45" height="45" /> <!-- the first 3 rect are masked with usespaceonuse units --> <use mask="url(#mymask1)" xlink:href="#r1" fill="red" /> <use mask="url(#mymask1)" xlink:href="#r2" fill="red" /> <use mask="url(#mymask1)" xlink:href="#r3" fill="red" /> <!-- the last rect is masked with objectbounding
box units --> <use mask="url(#mymask2)" xlink:href="#r4" fill="red" /> </svg> mask for <mask>, maskcontentunits defines the coordinate system in use for the content of the element.
... value userspaceonuse | objectbounding
box default value userspaceonuse animatable yes userspaceonuse this value indicates that all coordinates inside the <mask> element refer to the user coordinate system as defined when the mask was created.
...And 2 more matches
maskUnits - SVG: Scalable Vector Graphics
only one element is using this attribute: <mask> html,body,svg { height:100% } <svg view
box="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <mask id="mymask1" maskunits="userspaceonuse" x="20%" y="20%" width="60%" height="60%"> <rect fill="black" x="0" y="0" width="100%" height="100%" /> <circle fill="white" cx="50" cy="50" r="35" /> </mask> <mask id="mymask2" maskunits="objectbounding
box" x="20%" y="20%" width="60%" height="60%"> <rect fill="black" x="0" y="0" width="100%" height="100%" /> <circle fill="white" cx="50" cy="50" r="35" /> </mask> <!-- some reference rect to materialized the mask --> <rect id="r1" x="0" y...
...ct id="r3" x="55" y="55" width="45" height="45" /> <rect id="r4" x="55" y="0" width="45" height="45" /> <!-- the first 3 rect are masked with usespaceonuse units --> <use mask="url(#mymask1)" xlink:href="#r1" fill="red" /> <use mask="url(#mymask1)" xlink:href="#r2" fill="red" /> <use mask="url(#mymask1)" xlink:href="#r3" fill="red" /> <!-- the last rect is masked with objectbounding
box units --> <use mask="url(#mymask2)" xlink:href="#r4" fill="red" /> </svg> mask for <mask>, maskunits defines the coordinate system in use for the geometry attributes (x, y, width and height) of the element.
... value userspaceonuse | objectbounding
box default value objectbounding
box animatable yes userspaceonuse this value indicates that all coordinates for the geometry attributes refer to the user coordinate system as defined when the mask was created.
...And 2 more matches
patternUnits - SVG: Scalable Vector Graphics
only one element is using this attribute: <pattern> html,body,svg { height:100% } <svg view
box="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <!-- all geometry properties are relative to the current user space --> <pattern id="p1" x="12.5" y="12.5" width="25" height="25" patternunits="userspaceonuse"> <circle cx="10" cy="10" r="10" /> </pattern> <!-- all geometry properties are relative to the target bounding
box --> <pattern id="p2" x=".125" y=".125" width=".25" height=".25" patternunits="objectbounding
box"> <circle cx="10" cy="10" r="10" /> </pattern> <!-- left square with user space tiles --> <rect x="10" y="1...
...0" width="80" height="80" fill="url(#p1)" /> <!-- right square with bounding
box tiles --> <rect x="110" y="10" width="80" height="80" fill="url(#p2)" /> </svg> pattern for <pattern>, patternunits defines the coordinate system in use for the geometry properties (x, y, width and height) of the element.
... value userspaceonuse | objectbounding
box default value objectbounding
box animatable yes userspaceonuse this value indicates that all coordinates for the geometry properties refer to the user coordinate system as defined when the pattern was applied.
...And 2 more matches
Examples and demos from articles - Archive of obsolete content
.[article] pure-css web gallery based on the :checked pseudoclass [zip] you can also use the :checked pseudo-class applied to hidden radio
boxes in order to build, for example, an image gallery with full-size images shown only when mouse clicks on previews.
...[article] pure-css light
box [html] the :target pseudo-class is useful to switch on/off some invisible elements.
... in this way you can create a pure-css light
box.
... [article] pure-css editable (pseudo)<select> [html] this example shows how it's possible to simulate an editable <select> through a fieldset of radio
boxes and text
boxes.
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
<window id="main-window"> <tool
box id="navigator-tool
box"> <toolbar id="xulschoolhello-toolbar" toolbarname="&xulschoolhello.toolbarname.label;" accesskey="&xulschoolhello.toolbar.accesskey;" customizable="true" mode="icons" context="toolbar-context-menu" defaultset="xulschoolhello-hello-world-button" insertbefore="personaltoolbar" /> </tool
box> </window> (note for mac os x: <window id="main-window"...
...> and </window> are not required) our toolbar is added as a child of the tool
box element in the main browser window.
... the tool
box is the collection of toolbars in firefox, including the main menu bar.
...the other types, check
box and radio are useful when you have buttons that change state when the user clicks on them.
Custom XUL Elements with XBL - Archive of obsolete content
as explained earlier, xul is really just
boxes, text and images.
... <content> <xul:h
box> <xul:image class="xulshoolhello-person-image" xbl:inherits="src=image" /> <xul:v
box flex="1"> <xul:label xbl:inherits="value=name" /> <xul:description xbl:inherits="value=greeting" /> </xul:v
box> <xul:v
box> <xul:button label="&xulshoolhello.remove.label;" accesskey="&xulshoolhello.remove.accesskey;" oncommand="document.getbindingparent(this).remo...
...ve(event);" /> </xul:v
box> </xul:h
box> </content> our element is very simple, displaying an image, a couple of text lines and a button.
... with inheritance you could take the richlist
box element and modify it to make a rich item tree, or create a switch button that changes state everytime it's clicked.
Handling Preferences - Archive of obsolete content
you can type on the "filter" text
box to search for specific preferences.
...just type "xulschool" in the filter
box to see your new preference.
...--> </preferences> after you define the preferences you need, you associate them with the form elements in your window or pane using the preference attribute: <text
box preference="xulschoolhello-message-count-pref" type="number" min="0" max="100" /> in this case we use a numeric field to set the message count preference.
... finally, group
boxes are a good idea to organize the contents of the window and preference panes.
Extensions support in SeaMonkey 2 - Archive of obsolete content
marks menu popup menu_toolspopup taskpopup taskpopup tools menu popup - windowpopup windowpopup window menu popup menu_helppopup helppopup helppopup help menu popup urlbar icons to display a button with a menupopup in the urlbar-icons for both firefox and seamonkey 2.0, use this code: <h
box id="urlbar-icons"> <image popup="myext-menu"/> </h
box> <window id="main-window"> <menupopup id="myext-menu"> <menuitem label="menuitem"/> <menuitem label="menuitem"/> </menupopup> </window> instead of <h
box id="urlbar-icons"> <button type="menu"> <menupopup> <menuitem label="menuitem"...
.../> <menuitem label="menuitem"/> <menuitem label="menuitem"/> </menupopup> </button> </h
box> technical note: the code that opens the url history popup just looks for any menupopup, so it goes wrong if you add your own.
... the statusbar in firefox 3 a new v
box has been added, called "browser-bottom
box", which encloses the find bar and status bar at the bottom of the browser window.
... for example, if you overlay some chrome before the status bar, like this: <v
box id="browser-bottom
box"> <something insertbefore="status-bar" /> </v
box> use the following technique to make your overlay work on both seamonkey 2 and firefox 3: <window id="main-window"> <v
box id="browser-bottom
box" insertbefore="status-bar"> <something insertbefore="status-bar" /> </v
box> </window> thunderbird 3 gfolderdisplay api seamonkey 2.0 only supports a reduced set of methods: selectedcount selectedmessage selectedmessageisfeed selectedmessageisimap selectedmessageisnews selectedmessageisexternal selectedindices selectedmessages selectedme...
Source code directories overview - Archive of obsolete content
rhapsody contains source code for mac os x server (which is based on nextstep which is based on x-windows on unix) using yellow
box (cocoa).
...it is used to store mail
box data, news data and global history data.
...it is used for the auto-completion feature on the url edit
box (stored in netscape.hst in mozilla classic) and for the cached pages index (stored in fat.db in mozilla classic).
... widget contains c interfaces and code for platform independent controls (widgets), such as scroll bars, radio buttons and list
boxes.
Venkman Introduction - Archive of obsolete content
the column picker for this view (the
box on the top right) can be used to display a length column.
...type icons the column picker for this view (the
box on the top right) can be used to display type and flags columns.
... commands are entered in the text
box, and responses are appended to the end of the output.
... type /commands in the input area (the text
box) to list all of the commands available.
confirm - Archive of obsolete content
acheckmsg a string to display as a check
box label.
... acheckstate an object with a boolean value property representing the state of the check
box: when the dialog
box is shown, its check
box will be checked when this object's value is true.
... after the user presses a button (or closes the window), the value property is updated according to the check
box.
...notes the preferred method for detecting support for custom dialog
boxes is querying the existence of the button constants.
dlgtype - Archive of obsolete content
« xul reference home dlgtype type: one of the values below the dialog type of the button, used only when the button is in a dialog
box.
... you can use this feature to replace the standard dialog
box buttons with custom buttons, yet the dialog event methods will still function.
... for example, if the dlgtype is set to accept, the button will replace the dialog
box's accept button, which is usually labeled ok.
... using this attribute on a button that is not in a dialog
box has no effect.
Deprecated and defunct markup - Archive of obsolete content
elements <actions> (listed here by mistake or was it a container tag?) typo for <action> --neil 03 march 2011 <autorepeatbutton> (action occurs repeatedly on mouse hover--used to construct other elements; used in <arrowscroll
box> and large drop-down menus) so, not deprecated?
... --neil 03 march 2011 <bulletinboard> (made to support left/top styles, but <stack> can now do as well) <gripper> (inside of <scrollbar><thumb>; not to be used by itself) <list
boxbody> (internal use only; part of xbl for <list
box>) <menubutton> (experiment in combining buttons and menus; use <button type> instead) <nativescrollbar> (displayed a native scrollbar; had been for mac only with native themes on) <outliner> (former name for <tree>; <list
box> had been "<tree>") <popup> (use menupopup) <package> (no longer present but in older documentation) <scrollbarbutton> (button at end of scrollbar; had been only within larger <scrollbar>) so, not deprecated, but internal use only?
... --neil 03 march 2011 <sidebarheader> not true, still in use --neil 03 march 2011 <slider> (clickable tray in <scrollbar> which holds <thumb>; do not use alone) also used as part of <scale> --neil 03 march 2011 <spinner> (spin
box; <spinbuttons> with a text
box whereby spinning affects value in text
box; not usable) <spring> (use @flex instead) <strut> (replaced by @debug?) <tabcontrol> (contained tab
box and tabpanel) <text> (like <label> or <description> but does not wrap; like <label crop="end">; had been used in menus/toolbars) <textfield> (like <text
box>) <thumb> (<button> with deprecated <gripper>; implements sliding
box in center of scrolbar) <title> (to add a caption on a <titled
box> <titled
box> (
box with a frame) <titledbutton> (attempt to combine text...
... --neil 03 march 2011 <treecaption> (old/experimental and unsupported xul tags) <treecolgroup> (former name for <treecols> <treecolpicker> (internal use only; part of xbl for <tree>) <treefoot> (old/experimental and unsupported xul tags) <treeindentation> (old/experimental and unsupported xul tags) was a part of the old <tree> that predated <outliner> that was not converted to <list
box>--neil 03 march 2011 <treeicon> (old/experimental and unsupported xul tags) <treerows> (internal use only; part of xbl for <tree>) attributes @debug="true" provided struts and springs around
boxes to facilitate identification of flex issues but does not seem to work now you need a special debug_layout build --neil 03 march 2011 references xul element reference by neal deakin ra...
Introduction to XUL - Archive of obsolete content
mozilla applications will be built of "small" components like dialog buttons and mail in
box folders, which we collectively term "widgets." within a widget, drawing and user interactions are completely under control of the individual widget, and set when the widget was built.
... <html:script type="application/javascript"> // dialog initialization code function initwindow() { var check
box = document.getelementbyid("remember"); if (check
box) check
box.checked = true; } </html:script> javascript can be referenced as in html documents: as onclick handlers and the like.
... widgets widgets are generally objects like form controls: buttons, text
boxes, tree controls and the like.
...(see the
box system for details).
Property - Archive of obsolete content
« xul reference accessible accessibletype accesskey align allnotifications allowevents alwaysopenpopup amindicator applocale autocheck autofill autofillaftermatch
boxobject browsers builder builderview buttons canadvance cangoback cangoforward canrewind checked checkstate child children classname clickselectsall clientheight clientwidth collapsed color columns command commandmanager completedefaultindex container contentdocument contentprincipal contenttitle contentview contentvieweredit contentviewerfile contentwindow contextmenu control controller controllers crop current currentindex currentitem currentnotification currentpage currentpane currentset currenturi custo...
...seditem forcecomplete group handlectrlpageupdown handlectrltab hasuservalue height hidden hideseconds highlightnonmatches homepage hour hourleadingzero id ignoreblurwhilesearching image increment inputfield inverted is24hourclock ispm issearching iswaiting itemcount label labelelement lastpermanentchild lastselected left linkedpanel list
boxobject locked markupdocumentviewer max maxheight maxlength maxrows maxwidth menu menu
boxobject menupopup min minheight minresultsforpopup minwidth minute minuteleadingzero mode month monthleadingzero name next nomatch notificationshidden object observes onfirstpage onlastpage open ordinal orient pack pagecount pageid pageincrement...
... pageindex pagestep parentcontainer palette persist persistence placeholder pmindicator popup popup
boxobject popupopen position predicate preferenceelements preferencepanes preferences priority radiogroup readonly readonly ref resource resultspopup scroll
boxobject scrollincrement scrollheight scrollwidth searchbutton searchcount searchlabel searchparam searchsessions second secondleadingzero securityui selected selectedbrowser selectedcount selectedindex selecteditem selecteditems selectedpanel selectedtab selectionend selectionstart selstyle seltype sessioncount sessionhistory showcommentcolumn showpopup size smoothscroll spinbuttons src state statusbar statustext stringbu...
...ndle strings style subject suppressonselect tabcontainer tabindex tabs tabscrolling tabpanels tag textlength textvalue timeout title toolbarname toolbarset tooltip tooltiptext top tree
boxobject type uri useraction value valuenumber view webbrowserefind webnavigation webprogress width wizardpages wraparound year yearleadingzero related dom element properties dom:element.attributes dom:element.baseuri dom:element.childelementcount dom:element.childnodes dom:element.children dom:element.clientheight dom:element.clientleft dom:element.clienttop dom:element.clientwidth dom:element.clonenode dom:element.firstchild dom:element.firstelementchild dom:element.lastchild dom:element.lastelementchild dom:el...
Additional Template Attributes - Archive of obsolete content
<list
box datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.com/rdf/myphotos" template="phototemplate"/> ...
...the list
box here does not have any children, although it may do.
...the generated content is always inserted into the root node, in this example the list
box, not inside the template.
... <h
box 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> </h
box> in this example, the ?photo variable can be used instead of 'rdf:*' (although you can use either even if you specify the member variable).
Simple Query Syntax - Archive of obsolete content
here is what it might look like: <template> <v
box class="
box-padded" uri="rdf:*"> <image src="rdf:*"/> <label value="rdf:http://purl.org/dc/elements/1.1/title"/> </v
box> </template> there is no <query> or <action> element used.
...you can see in the example that the value 'rdf:*' is used in two places, the uri attribute on the h
box and as the src attribute for the image.
...for example, to filter for photos with a specific country: <h
box 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"> <v
box class="
box-padded" uri="rdf:*"> <image src="rdf:*"/> <label value="rdf:http://purl.org/dc/elements/1.1/title"/> </v
box> </rule...
...> </template> </h
box> 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/iso#it'.
Adding Methods to XBL-defined Elements - Archive of obsolete content
xul: <
box id="num" class="labeledbutton" title="number of things:" value="52"/> <button label="show" oncommand="document.getelementbyid('num').showtitle(true)"/> <button label="hide" oncommand="document.getelementbyid('num').showtitle(false)"/> xbl: <binding id="labeledbutton"> <content> <xul:label xbl:inherits="value=title"/> <xul:label xbl:inherits="value"/> </content> <implementation> ...
...(in this example, it is the
box with the labeledbutton class).
...for example: xul: <
box id="outer" class="container"> <button label="one"/> <button label="two"/> <button label="three"/> <button label="four"/> </
box> xbl: <binding id="labeledbutton"> <content> <description value="a stack:"/> <stack> <children/> </stack> </content> </binding> if you use the dom functions such as childnodes to get the children of the the xul
box element with the id of o...
...the length of the anonymous array of the outer
box is two, the first element the description element and the second the stack element.
Keyboard Shortcuts - Archive of obsolete content
note that text
boxes have the clipboard shortcuts built-in so you don't have to implement them yourself.
... <?xml version="1.0" encoding="utf-8"?> <window xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul"> <keyset> <key id="cut_cmd" modifiers="accel" key="x"/> <key id="copy_cmd" modifiers="accel" key="c"/> <key id="paste_cmd" modifiers="accel" key="v"/> <key id="close_cmd" keycode="vk_escape" oncommand="window.close();"/> </keyset> <v
box flex="1"> <tool
box> <menubar id="findfiles-menubar"> <menu id="file-menu" label="file" accesskey="f"> <menupopup id="file-popup"> <menuitem label="open search..." accesskey="o"/> <menuitem label="save search..." accesskey="s"/> <menuseparator/> <menuitem label="close" accesskey="c" key="close_cmd" oncommand="window.close();"/> </menupopup> </m...
...enu> <menu id="edit-menu" label="edit" accesskey="e"> <menupopup id="edit-popup"> <menuitem label="cut" accesskey="t" key="cut_cmd"/> <menuitem label="copy" accesskey="c" key="copy_cmd"/> <menuitem label="paste" accesskey="p" key="paste_cmd" disabled="true"/> </menupopup> </menu> </menubar> </tool
box> </v
box> </window> now we can use those shortcuts to activate the commands.
...typically, this will include text
boxes, buttons, check
boxes and so forth.
Localization - Archive of obsolete content
&pastecmd.label;" accesskey="&pastecmd.accesskey;" disabled="true"/> </menupopup> </popupset> <keyset> <key id="cut_cmd" modifiers="accel" key="&cutcmd.commandkey;"/> <key id="copy_cmd" modifiers="accel" key="©cmd.commandkey;"/> <key id="paste_cmd" modifiers="accel" key="&pastecmd.commandkey;"/> <key id="close_cmd" keycode="vk_escape" oncommand="window.close();"/> </keyset> <v
box flex="1"> <tool
box> <menubar id="findfiles-menubar"> <menu id="file-menu" label="&filemenu.label;" accesskey="&filemenu.accesskey;"> <menupopup id="file-popup"> <menuitem label="&opencmd.label;" accesskey="&opencmd.accesskey;"/> <menuitem label="&savecmd.label;" accesskey="&savecmd.accesskey;"/> <menuseparator/> ...
...opycmd.accesskey;" key="copy_cmd"/> <menuitem label="&pastecmd.label;" accesskey="&pastecmd.accesskey;" key="paste_cmd" disabled="true"/> </menupopup> </menu> </menubar> <toolbar id="findfiles-toolbar"> <toolbarbutton id="opensearch" label="&opencmdtoolbar.label;"/> <toolbarbutton id="savesearch" label="&savecmdtoolbar.label;"/> </toolbar> </tool
box> <tab
box> <tabs> <tab label="&searchtab;" selected="true"/> <tab label="&optionstab;"/> </tabs> <tabpanels> <tabpanel id="searchpanel" orient="vertical" context="editpopup"> <description> &finddescription; </description> <spacer class="titlespace"/> <group
box orient="horizontal"> <caption label="&findcriteria;"/> <menulist id="searchtype"> ...
... <spacer class="springspace"/> <menulist id="find-text" flex="1" editable="true" datasources="file:///mozilla/recents.rdf" ref="http://www.xulplanet.com/rdf/recent/all"> <template> <menupopup> <menuitem label="rdf:http://www.xulplanet.com/rdf/recent#label" uri="rdf:*"/> </menupopup> </template> </menulist> </group
box> </tabpanel> <tabpanel id="optionspanel" orient="vertical"> <check
box id="casecheck" label="&casesensitive;"/> <check
box id="wordscheck" label="&matchfilename;"/> </tabpanel> </tabpanels> </tab
box> <tree id="results" style="display: none;" flex="1"> <treecols> <treecol id="name" label="&results.filename;" flex="1"/> <treecol id="location" label="&results.loc...
...&results.size;" flex="1"/> </treecols> <treechildren> <treeitem> <treerow> <treecell label="mozilla"/> <treecell label="/usr/local"/> <treecell label="&bytes.before;2520&bytes.after;"/> </treerow> </treeitem> </treechildren> </tree> <splitter id="splitbar" resizeafter="grow" style="display: none;"/> <spacer class="titlespace"/> <h
box> <progressmeter id="progmeter" value="50%" style="display: none;"/> <spacer flex="1"/> <button id="find-button" label="&button.find;" oncommand="dofind()"/> <button id="cancel-button" label="&button.cancel;" oncommand="window.close();"/> </h
box> </v
box> </window> each text string has been replaced by an entity reference.
Scroll Bars - Archive of obsolete content
some elements, such as text
boxes, will also add scroll bars as necessary when the content inside is too large.
...a scroll bar is made up of several parts: the slider, which is the main part of the scroll bar with the adjustable
box, and the two arrow buttons on the end.
... curpos this indicates the current position of the scroll bar thumb (the
box that you can slide back and forth.) the value ranges from 0 to the value of maxpos.
... pageincrement the value here specifies how much the value of curpos changes by when the user clicks pages through the scroll bar, which can be done by clicking on the tray between the
box and the arrows.
Using the Editor from XUL - Archive of obsolete content
the <editor> tag actually creates an nseditor
boxobject behind the scenes.
... the nseditor
boxobject creates an nseditorshell, and holds the owning reference to it.
... through the magic of xbl, the xul bindings, and the nsieditor
boxobject interface, you can get a javascript reference to the editorshell from the editor element with element.editorshell.
...when the last reference to the nseditorshell goes away (as a result of nseditor
boxobject releasing its reference) it releases the owning reference on the editor.
The Implementation of the Application Object Model - Archive of obsolete content
by keeping the dom tree in a sand
box (safely insulated from the containing aom tree in which it might occur), you have an easy means of distinguishing the two trees and preventing scripts in the dom tree from manipulating the aom tree.
...in the xul, you could use a syntax like <toolbar localdata="mail
box:blah"/> which would specify a uri that pointed to a specific mail
box node.
...suppose that a bookmarks folder contains a mail
box folder, a composer page template, and a bookmark.
...examples of tags that can reference local data are menu, menuitem, menubar, tool
box, toolbar, treebody, and treeitem.
caption - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a header for a group
box.
... attributes accesskey, crop, image, label, tabindex properties accesskey, crop, image, label, tabindex examples <group
box> <caption label="my group
box"/> </group
box> <group
box flex="1"> <caption> <check
box label="a checked group
box"/> </caption> </group
box> attributes accesskey type: character this should be set to a character that is used as a shortcut key.
...if the
box direction is reversed, the cropping is reversed.
...fore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements group
box, check
box ...
listcol - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a column in a list
box.
... examples example <!-- a two column list
box with one column flexible --> <list
box> <listhead> <listheader label="first"/> <listheader label="last"/> </listhead> <listcols> <listcol flex="1"/> <listcol/> </listcols> <listitem> <listcell label="buck"/> <listcell label="rogers"/> </listitem> <listitem> <listcell label="john"/> <listcell label="painter"/> </listitem> </list
box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, mi...
...nheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dis...
...), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements list
box, listcell, listcols, listhead, listheader, listitem ...
listheader - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a header for a single column in a list
box.
... attributes disabled properties acesssibletype examples <list
box> <listhead> <listheader label="name"/> <listheader label="occupation"/> </listhead> <listitem> <listcell label="george"/> <listcell label="house painter"/> </listitem> <listitem> <listcell label="mary ellen"/> <listcell label="candle maker"/> </listitem> <listitem> <listcell label="roger"/> <listcell label="swashbuckler"/> </listitem> </list
box> attributes disabled type: boolean indicates whether the element is disabled or not.
... inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
...), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements list
box, listcell, listcol, listcols, listhead, listitem ...
panel - Archive of obsolete content
attributes backdrag, close, consumeoutsideclicks, fade, flip, ignorekeys, label, left, level, noautofocus, noautohide, norestorefocus, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, position, titlebar, top, type properties accessibletype, label, popup
boxobject, popup, state methods hidepopup, moveto, openpopup, openpopupatscreen, sizeto examples the following example shows how a panel may be attached to a label.
... <panel id="thepanel"> <h
box align="start"> <image src="warning.png"/> <v
box> <description value="you have 6 new messages."/> <h
box> <button label="read mail"/> <button label="new message"/> </h
box> </v
box> </h
box> </panel> <description value="6 new messages" popup="thepanel"/> attributes backdrag type: boolean setting the backdrag attribute on a xul panel lets the user move the panel by clicking and dragging anywhere on its background area.
... autocomplete-richlist
box specify this for a panel that provides a richlist
box for an autocomplete element.
... popup
boxobject type: nsipopup
boxobject this read-only property holds the nsipopup
boxobject that implements the popup.
radio - Archive of obsolete content
if the
box direction is reversed, the cropping is reversed.
...be aware, however, that some elements, such as text
box will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily ...
...for text
box and user editable menulist elements, the contents, as visible to the user, are read and set using the text
box.value and menulist.value syntax.
...re(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements radiogroup, check
box interfaces nsiaccessibleprovider, nsidomxulselectcontrolitemelement, nsidomxullabeledcontrolelement ...
radiogroup - Archive of obsolete content
place the radiogroup inside a group
box if you would like a border or caption for the group.
...be aware, however, that some elements, such as text
box will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily ...
...the list
box, richlist
box, radiogroup, etc., not the list item that was selected) when it is changed either via this property, the selectedindex property, or changed by the user.
...for text
box and user editable menulist elements, the contents, as visible to the user, are read and set using the text
box.value and menulist.value syntax.
tab - Archive of obsolete content
the user may click a tab to bring the associated page of the tab
box to the front.
...if the
box direction is reversed, the cropping is reversed.
...for text
box and user editable menulist elements, the contents, as visible to the user, are read and set using the text
box.value and menulist.value syntax.
... related elements tab
box, tabs, tabpanels, tabpanel.
tabbrowser - Archive of obsolete content
w, currenturi, docshell, documentcharsetinfo, homepage, markupdocumentviewer, securityui, selectedbrowser, selectedtab, sessionhistory, tabcontainer, tabs, visibletabs, webbrowserfind, webnavigation, webprogress methods addprogresslistener, addtab, addtabsprogresslistener,appendgroup, getbrowseratindex, getbrowserindexfordocument, getbrowserfordocument, getbrowserfortab, geticon, getnotification
box, gettabforbrowser, gettabmodalprompt
box, goback, gobackgroup, goforward, goforwardgroup, gohome, gotoindex, loadgroup, loadonetab, loadtabs, loaduri, loaduriwithflags, movetabto, pintab, reload, reloadalltabs, reloadtab, reloadwithflags, removealltabsbut, removecurrenttab, removeprogresslistener, removetab, removetabsprogresslistener,replacegroup, selecttabatindex, seticon, showonlythesetabs, sto...
... getnotification
box( browser ) return type: notification
box element returns a notification
box for the specified browser element.
... gettabmodalprompt
box( browser ) return type: object returns an object that manages tab-modal prompts for the specified browser.
... returns a prompt
box object representing the new prompt.
titlebar - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ]
boxes created with the titlebar element behave just like a normal window titlebar: when the element is clicked and dragged, the window moves with it.
...buttons inside it can't be clicked and text
boxes can't be focused with the mouse.
... <?xml version="1.0"?> <window title="movable hud window" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" width="300" height="200" style="background: transparent; -moz-appearance: none;"> <titlebar flex="1" oncommand="close()" style="background: rgba(30, 30, 30, 0.9); -moz-border-radius: 10px; -moz-
box-shadow: 0 1px 8px rgba(0, 0, 0, 0.8); margin: 8px 12px 16px;"/> </window> it can be opened from the error console like this: open("file:///users/markus/sites/hudwindow.xul", "", "chrome=1, titlebar=0") attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, ...
... properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
2006-10-27 - Archive of obsolete content
the question tony posted was that he wanted to know what was wrong with fx 1.5.0.x (linux) tinder
box because it has been failing since october 22 at around 5:45 pm pdt.
...these were the following choices stated: search the filesystem for unneeded files delete or archive them, add a hard disk, move all or part of the concerned filesystem there move that tinder
box to a different machine with more empty disk space on october 23rd: nick responded to gavin and tony's posting.
... nick stated that the build engineers knew that there was a problem with the tinder
box and that they would be solving the problem by adding a hard disk, and moving all or part of the concerned filesystem there.
... he also mentioned that the tinder
box is just a virtual machine, so you can easily allocate more space to it as need, assuming the host has some available.
Tamarin Tracing Build Documentation - Archive of obsolete content
http://developer.mozilla.org/en/docs...formance_tests tamarin buildbot adobe maintains a continuous build and test system for tamarin tracing and continuous build and test system for tamarin central, similar to tinder
box.
...tamarin buildbot tryserver the tryserver/sand
box is setup to allow users to push any code changes that they would like to have tested in the automated build/test process prior to actually pushing the changes.
... the sand
box is setup so that it is able to build and test branches that are based on either tamarin-central or tamarin-tracing.
...description: self explanatory check the status of the build @ http://tamarin-builds.mozilla.org/sand
box/ tryserver etiquette the sand
box is not a good substitute for running the regression tests locally to catch obvious problems.
Theme changes in Firefox 3.5 - Archive of obsolete content
global/check
box.css, global/radio.css since bug 394892, radio buttons and check
boxes no longer have a minimum size on mac os x.
... if your theme uses native check
boxes or radiobuttons (-moz-appearance: radio / check
box), this can result in distorted controls.
... you might have to set the width and height of .check
box-check and .radio-check to 16px to avoid that problem.
...to do this only for 3.5 use a css selector that is only supported in 3.5, like so: window:not([active="true"]) menubar>menu:nth-child(1n) { color:threedshadow } private browsing: show private browsing state by coloring the url bar, or by adding an icon to the tool
box/tabbrowserbar.
Theme changes in Firefox 4 - Archive of obsolete content
the iconsize attribute of the tool
box element in the main browser window (#navigator-tool
box) still reflects the user preference in the toolbar customization palette.
...to do this, use a css rule that depends on the iconsize attribute on the #navigator-tool
box 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-tool
box 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-tool
box[iconsize="large"] > #personaltoolbar { counter-reset: largeicons; } to use large icons everywhere, including the menu bar, regardless of the user preference: #navigator-tool
box > 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).
Scratchpad - Archive of obsolete content
opening scratchpad in the tool
box new in firefox 47.
... from firefox 47, you can open scratchpad inside the tool
box.
... now scratchpad will be available in the tool
box, alongside other tools like the page inspector and the web console.
...you'll see the autocomplete
box, as shown below: the icon next to each suggestion indicates the type, and the currently highlighted suggestion gets a popup with more information.
::-ms-check - Archive of obsolete content
the ::-ms-check css pseudo-element is a microsoft extension that represents check
boxes and radio button groups created by <input type="check
box"> and <input type="radio">.
...age background-origin background-repeat background-size border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-left-color border-left-style border-left-width border-right-color border-right-style border-right-width border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width
box-shadow
box-sizing color cursor display (values block, inline-block, none) @font-face font-size font-style font-weight height margin-bottom margin-left margin-right margin-top opacity outline-color outline-style outline-width padding-bottom padding-left padding-right padding-top transform transform-origin visibility width syntax ::-ms-check example html <form> <la...
...bel for="redbutton">red</label> <input type="radio" id="redbutton"><br> <label for="greencheck
box">green</label> <input type="check
box" id="greencheck
box"> </form> css input, label { display: inline; } input[type=radio]::-ms-check { border-color: red; /* this will make the border red when the button is checked.
...*/ } input[type=check
box]::-ms-check { border-color: green; /* this will make the
box green when the button is checked.
Mozilla XForms User Interface - Archive of obsolete content
check
box - used for boolean instance data datepicker - default representation for date data types.
... similar to a combo
box.
...it can have the following representations: list
box - default representation check
box group - used when appearance = 'full' select1 combo
box control.
...it can have the following representations: combo
box - default representation list
box - used when appearance = 'compact' radio group - used when appearance = 'full' additional elements these elements may be used as child elements to the form controls described above.
Implementing controls using the Gamepad API - Game development
firefox 29+ and chrome 35+ support it out of the
box.
... the most popular gamepads right now are those from the x
box 360, x
box one, ps3 and ps4 — they have been heavily tested and work well with the gamepad api implementation in browsers across windows and mac os x.
...the code discussed in this article was tested with a few gamepads, but the author's favorite configuration is a wireless x
box 360 controller and the firefox browser on mac os x.
...ically by the user or due to inactivity.) in the demo, the gamepadapi object is used to store everything related to the api: var gamepadapi = { controller: {}, turbo: false, connect: function() {}, disconnect: function() {}, update: function() {}, buttonpressed: function() {}, buttons: [], buttonscache: [], buttonsstatus: [], axesstatus: [] }; the buttons array contains the x
box 360 button layout: buttons: [ 'dpad-up','dpad-down','dpad-left','dpad-right', 'start','back','axis-left','axis-right', 'lb','rb','power','a','b','x','y', ], this can be different for other types of gamepads like the ps3 controller (or a no-name, generic one), so you have to be careful and not just assume the button you're expecting will be the same button you'll actually get.
CSS and JavaScript accessibility best practices - Learn web development
for example, in our tabbed info
box example (see source code) we have three panels of information, but we are positioning them on top of one another and providing tabs that can be clicked to show each one (it is also keyboard accessible — you can alternatively use tab and enter/return to select them).
...think carefully about whether you need that shiny javascript-powered 3d information
box, or whether plain old text would do.
...here you'll see a simple form; when you try to submit the form with one or both fields left empty, the submit fails, and an error message
box appears to tell you what is wrong.
...bmit = validate; function validate(e) { errorlist.innerhtml = ''; for(let i = 0; i < formitems.length; i++) { const testitem = formitems[i]; if(testitem.input.value === '') { errorfield.style.left = '360px'; createlink(testitem); } } if(errorlist.innerhtml !== '') { e.preventdefault(); } } note: in this example, we are hiding and showing the error message
box using absolute positioning rather than another method such as visibility or display, because it doesn't interfere with the screen reader being able to read content from it.
Fundamental CSS comprehension - Learn web development
write a ruleset that gives the <h2> an effective font size of 20px (but expressed in ems) and an appropriate line height to place it in the center of the header's content
box.
... recall from earlier that the content
box height should be 30px — this gives you all the numbers you need to calculate the line height.
... write a ruleset that gives the <p> inside the footer an effective font size of 15px (but expressed in ems) and an appropriate line height to place it in the center of the footer's content
box.
... recall from earlier that the content
box height should be 30px — this gives you all the numbers you need to calculate the line height.
Test your skills: Overflow - Learn web development
task one the content is overflowing the
box because it has a fixed height.
... keep the height but cause the
box to have scrollbars only if there is enough text to cause an overflow.
... task two in this task an image is in the
box, it is bigger than the dimensions of the
box so overflows visibly.
... change it so that any image outside of the
box is hidden.
Pseudo-classes and pseudo-elements - Learn web development
:checked matches a radio button or check
box in the selected state.
... :indeterminate matches ui elements whose value is in an indeterminate state, usually check
boxes.
... ::marker matches the marker
box of a list item, which typically contains a bullet or number.
... previous overview: building blocks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the
box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing your css ...
Test your skills: backgrounds and borders - Learn web development
backgrounds and borders 1 in this task we want you to add a background, border, and some simple styling to a page header: give the
box a 5px black solid border, with rounded corners of 10px.
... add a background image (use the url balloons.jpg) and size it so that it covers the
box.
... backgrounds and borders 2 in this task we want you to add background images, a border, and some other styling to a decorative
box: give the
box a 5px lightblue border, and round the top left corner 20px and the bottom right corner 40px the heading uses the star.png image as a background image, with a single centered star on the left and a repeating pattern of stars on the right.
...your post should include: a descriptive title such as "assessment wanted for flex
box layout 1 skill test".
Multiple-column layout - Learn web development
in this case the content breaks when the spanning element is introduced and continues below creating a new set of column
boxes.
...in the live example below, i have used multicol to lay out a series of
boxes, each of which have a heading and some text inside.
...this is the container of the heading and text, and therefore we do not want to fragment this
box.
... .card { break-inside: avoid; page-break-inside: avoid; background-color: rgb(207,232,220); border: 2px solid rgb(79,185,227); padding: 10px; margin: 0 0 1em 0; } reload the page and your
boxes should stay in one piece.
Positioning - Learn web development
what if you want to slightly alter the position of some
boxes inside a layout from their default layout flow position, to give a slightly quirky, distressed feel?
...illogical as it may initially sound, this is just the way that relative positioning works — you need to think of an invisible force that pushes the specified side of the positioned
box, moving it in the opposite direction.
... so for example, if you specify top: 30px;, a force pushes the top of the
box, causing it to move downwards by 30px.
... for example, popup information
boxes and control menus; rollover panels; ui features that can be dragged and dropped anywhere on the page; and so on...
How CSS is structured - Learn web development
h1 a:link .manythings #onething * .
box p .
box p:first-child h1, h2, .intro try creating some css rules that use the selectors above.
...an example would be the calc() function, which can do simple math within css: <div class="outer"><div class="
box">the inner
box is 90% - 30px.</div></div> .outer { border: 5px solid black; } .
box { padding: 10px; width: calc(90% - 30px); background-color: rebeccapurple; color: white; } this renders as: a function consists of the function name, and parentheses to enclose the values for the function.
... in the case of the calc() example above, the values define the width of this
box to be 90% of the containing block width, minus 30 pixels.
... <div class="
box"></div> .
box { margin: 30px; width: 100px; height: 100px; background-color: rebeccapurple; transform: rotate(0.8turn) } the output from the above code looks like this: look up different values of properties listed below.
Client-side form validation - Learn web development
hort message</label> <textarea id="t3" name="msg" maxlength="140" rows="5"></textarea> </p> <p> <button>submit</button> </p> </form> and now some css to style the html: form { font: 1em sans-serif; max-width: 320px; } p > label { display: block; } input[type="text"], input[type="email"], input[type="number"], textarea, fieldset { width : 100%; border: 1px solid #333;
box-sizing: border-
box; } input:invalid {
box-shadow: 0 0 5px 1px red; } input:focus:invalid {
box-shadow: none; } this renders as follows: see validation-related attributes for a complete list of attributes that can be used to constrain input values and the input types that support them.
...ome basic css to improve the look of the form slightly, and provide some visual feedback when the input data is invalid: body { font: 1em sans-serif; width: 200px; padding: 0; margin : 0 auto; } p * { display: block; } input[type=email]{ -webkit-appearance: none; appearance: none; width: 100%; border: 1px solid #333; margin: 0; font-family: inherit; font-size: 90%;
box-sizing: border-
box; } /* this is our style for the invalid fields */ input:invalid{ border-color: #900; background-color: #fdd; } input:focus:invalid { outline: none; } /* this is the style of our error messages */ .error { width : 100%; padding: 0; font-size: 80%; color: white; background-color: #900; border-radius: 0 0 5px 5px;
box-sizing: border-
box; } .error.active ...
... // there are many ways to pick a dom node; here we get the form itself and the email // input
box, as well as the span element into which we will place the error message.
... body { font: 1em sans-serif; width: 200px; padding: 0; margin : 0 auto; } form { max-width: 200px; } p * { display: block; } input.mail { -webkit-appearance: none; width: 100%; border: 1px solid #333; margin: 0; font-family: inherit; font-size: 90%;
box-sizing: border-
box; } /* this is our style for the invalid fields */ input.invalid{ border-color: #900; background-color: #fdd; } input:focus.invalid { outline: none; } /* this is the style of our error messages */ .error { width : 100%; padding: 0; font-size: 80%; color: white; background-color: #900; border-radius: 0 0 5px 5px;
box-sizing: border-
box; } .error.active {...
Example 5 - Learn web development
change states html content <form class="no-widget"> <select name="myfruit"> <option>cherry</option> <option>lemon</option> <option>banana</option> <option>strawberry</option> <option>apple</option> </select> <div class="select" role="list
box"> <span class="value">cherry</span> <ul class="optlist hidden" role="presentation"> <li class="option" role="option" aria-selected="true">cherry</li> <li class="option" role="option">lemon</li> <li class="option" role="option">banana</li> <li class="option" role="option">strawberry</li> <li class="option" role="option">apple</li> </ul> </div> </form> css content .widget select, .no-widget .select { p...
...osition : absolute; left : -5000em; height : 0; overflow : hidden; } /* --------------- */ /* required styles */ /* --------------- */ .select { position: relative; display : inline-block; } .select.active, .select:focus {
box-shadow: 0 0 3px 1px #227755; outline: none; } .select .optlist { position: absolute; top : 100%; left : 0; } .select .optlist.hidden { max-height: 0; visibility: hidden; } /* ------------ */ /* fancy styles */ /* ------------ */ .select { font-size : 0.625em; /* 10px */ font-family : verdana, arial, sans-serif; -moz-
box-sizing : border-
box;
box-sizing : border-
box; padding : 0.1em 2.5em 0.2em 0.5em; /* 1px 25px 2px 5px */ width : 10em; /* 100px */ border : 0.2em solid #000; /* 2px */ border-radius...
... : 0.4em; /* 4px */
box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : -webkit-linear-gradient(90deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-
box-sizing : border-
box;
box-sizing : border-
box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .op...
...tlist { z-index : 2; list-style: none; margin : 0; padding: 0; background: #f0f0f0; border: .2em solid #000; border-top-width : .1em; border-radius: 0 0 .4em .4em;
box-shadow: 0 .2em .4em rgba(0,0,0,.4); -moz-
box-sizing : border-
box;
box-sizing : border-
box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helpers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback); } // -------------------- // // function definitions // // -------------------- // function deactivateselect(select) { if (!select.classlist.contains...
Test your skills: Advanced styling - Learn web development
first of all, try giving the search
box a consistent width, height, padding, and border color across browsers.
...can you add some kind of styling back in so that users can tell when the search
box is being hovered or focused?
... another thing that commonly denotes a search
box is a magnifying glass icon.
...can you figure out a sensible way to attach it, and can you use some css to get it to sit to the right of the search
box, and be lined up vertically as well?
CSS basics - Learn web development
your work-in-progress should look similar to this: css: all about
boxes something you'll notice about writing css: a lot of it is about
boxes.
...most html elements on your page can be thought of as
boxes sitting on top of other
boxes.
... css layout is mostly based on the
box model.
... each
box taking up space on your page has properties like: padding, the space around the content.
Drawing graphics - Learn web development
this works out as the bottom left corner of the text
box (literally, the
box surrounding the text you draw), which might confuse you as other drawing operations tend to start from the top left corner — bear this in mind.
... parameters 6 and 7 specify the top-left corner of the
box into which to draw the slice on the canvas — the x position is 0 + posx, meaning that we can alter the drawing position by altering the posx value.
...add the following chunk of code at the bottom of your javascript: let cube; let loader = new three.textureloader(); loader.load( 'metal003.png', function (texture) { texture.wraps = three.repeatwrapping; texture.wrapt = three.repeatwrapping; texture.repeat.set(2, 2); let geometry = new three.
boxgeometry(2.4, 2.4, 2.4); let material = new three.meshlambertmaterial( { map: texture, shading: three.flatshading } ); cube = new three.mesh(geometry, material); scene.add(cube); draw(); }); there's a bit more to take in here, so let's go through it in stages: we first create a cube global variable so we can access our cube from anywhere in the code.
...next, we create a new
boxgeometry object and a new meshlambertmaterial object, and bring them together in a mesh to create our cube.
Server-side web frameworks - Learn web development
django follows the "batteries included" philosophy and provides almost everything most developers might want to do "out of the
box".
... while minimalist, flask can create serious websites out of the
box.
... typescript support out-of-the-
box.
... asp.net is used by microsoft, x
box.com, stack overflow, and many others.
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
where the check
box has been checked).
...we need to wire up the todo.hbs template to the service, so that checking the relevant check
box changes the state of each todo.
...e('todo-data') todos; } next, go back again to our todo-data.js service file and add the following action just below the previous ones, which will allow us to toggle a completion state for each todo: @action togglecompletion(todo) { todo.iscompleted = !todo.iscompleted; } updating the template to show completed state finally, we will edit the todo.hbs template such that the check
box's value is now bound to the iscompleted property on the todo, and so that on change, the togglecompletion() method on the todo service is invoked.
... in todo.hbs, first find the following line: <li> and replace it with this — you'll notice that here we're using some more conditional content to add the class value if appropriate: <li class="{{ if @todo.iscompleted 'completed' }}"> next, find the following line: <input aria-label="toggle the completion of this todo" class="toggle" type="check
box" > and replace it with this: <input class="toggle" type="check
box" aria-label="toggle the completion of this todo" checked={{ @todo.iscompleted }} {{ on 'change' (fn this.todos.togglecompletion @todo) }} > note: the above snippet uses a new ember-specific keyword — fn.
Ember resources and troubleshooting - Learn web development
more concretely, using mut allows for template-only settings functions to be declared: <check
box @value={{this.somedata}} @ontoggle={{fn (mut this.somedata) (not this.somedata)}} /> whereas, without mut, a component class would be needed: import component from '@glimmer/component'; import { tracked } from '@glimmer/tracking'; import { action } from '@ember/object'; export default class example extends component { @tracked somedata = false; @action setdata(newvalue) { this.s...
...omedata = newvalue; } } which would then be called in the template like so: <check
box @data={{this.somedata}} @onchange={{this.setdata}} /> due to the conciseness of using mut, it may be desireable to reach for it.
... there have been a coupleof new ideas put together into the form of addons that use the public apis, ember-set-helper and ember-
box.
... with ember-set-helper: <check
box @value={{this.somedata}} @ontoggle={{set this "somedata" (not this.somedata)}} /> with ember-
box: {{#let (
box this.somedata) as |somedata|}} <check
box @value={{unwrap somedata}} @ontoggle={{update somedata (not this.somedata)}} /> {{/let}} note that none of these solutions are particularly common among members of the community, and as a whole, people are still trying to figure out an ergonomic and simple api for setting data in a template-only context, without backing js.
mozbrowserselectionstatechanged
top: the y coordinate of the top of the bounding
box, in css pixels.
... bottom: the y coordinate of the bottom of the bounding
box, in css pixels.
... left: the x coordinate of the left of the bounding
box, in css pixels.
... right: the x coordinate of the right of the bounding
box, in css pixels.
What every Mozilla translator should know
when you create a bug, if you want the person in charge of the l10n to follow up your bug you should cc: l10n@mozilla.com if you choose to make changes to your localization, you should make the changes local to your disk, push them to your hg repository on merucial, test the changes on a nightly/tinder
box build, fix any errors if some are found and test again, and send the new changeset id as your "opt-in" revisions to the l10-drivers.
...if so, change the state of the bug to verified and write verified1.8.xxx in the keyword field tinder
box in tinder
box you can see the result of the build process.
... once you have made some changes in mercurial, as soon as the next build is done you can check the tinder
box and see if something was wrong.
... l10n tinder
box when the color is green, it means that the build process has finished with no errors.
Mozilla Quirks Mode Behavior
use
box-sizing:border-
box for most input types and textarea.
... something about the overhanging border (i.e., the half of the border that's outside the border-
box) in border-collapse tables differs between quirks mode and standards mode.
... [see nstableframe::getdeflationforbackground and figure out what really differs, and when it started differing.] gecko had bug 248239, where table cells acted as they had
box-sizing:border-
box applied for the purpose of the height property.
... (firefox 16 / thunderbird 16 / seamonkey 2.13) since this version bug 338554 is fixed and (-moz-)
box-sizing applies to table cells in standards mode, but quirks mode keeps the old behavior.
XUL Accessibility
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> <text
box 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...
... <label value="it's label for control" control="control" /> <h
box role="grouping" id="control" /> get tooltiptext attribute if the element 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="des...
...cr2">label2</description> <text
box aria-describedby="descr1 descr2" /> if neighbour of the element has description element pointing to this element by the control attribute, if the description element is found then use its content.
... <description value="it's label for control" control="control" /> <h
box role="grouping" id="control" /> get tooltiptext attribute value if the aria role is used and it allows to have accessible value then aria-valuetext or aria-valuenow are used if the element is xlink then value is generated from link location actions if the element is xlink then jump action is exposed if the element has registered click event handler then click action is exposed xul elements notification used to display an informative message.
nsPIPromptService
echeck
boxmsg the value is 1.
... this is the label text of a check
box on the dialog.
...echeck
boxstate the value is 1.
... this is the default check
box state and the result of it.
XUL Overlays
the layout engine loads any overlay files and then flows the resulting xul document, so problems associated with incremental insertion in menus,
boxes, tables, and forms are avoided.
...the mechanism is the same, however.) any dialog that wants to overlay these buttons just declares the overlay at the top: <?xul-overlay href="chrome://global/content/dialogoverlay.xul"?> and includes an empty
box with an id of okcancelbuttons in the ui.
... the following snippet shows a dialog with custom ui elements at the top and a reference to the overlay's ok and cancel buttons at the bottom: <
box align="horizontal" id="bx1" flex="100%" style="margin-bottom: 1em; width: 100%;"> <html:input type="check
box" id="dialog.newwindow"/> <html:label for="dialog.newwindow">&openwin.label;</html:label> <spring flex="100%"/> </
box> <
box id="okcancelbuttons"/> for more detail, see the ok and cancel button definitions being referenced here in the global component file platformdialogoverlay.xul.
... toolbars, submenus,
boxes, and any other subtrees that appear in multiple places can be defined in overlays files in this way and referenced for reuse wherever necessary.
Main Windows
msghdrviewoverlay.xul shown in blue above (where?), this overlay consists of three
boxes.
...the third is the attachment
box which can be toggled into a slim or an expanded view basemenuoverlay.xul contains the contents of most of the menus (i.e.
... msghdrviewoverlay.xul shown in blue above, this overlay consists of three
boxes.
...the third is the attachment
box which can be toggled into a slim or an expanded view basemenuoverlay.xul contains the contents of most of the menus (i.e.
Mozilla
creating sand
boxed http connections starting with gecko 1.8.1 (firefox 2), it is possible to create sand
boxed http connections which don't affect the user's cookies.
... gecko's "almost standards" mode "almost standards" rendering mode is exactly the same as "standards" mode in all details save one, where it works like "quirks" mode: the height calculations for line
boxes and some of the inline elements in them.
...(to get a stacktrace for thunderbird or some other product, substitute the product name where ever you see firefox in this instructions.) how to implement a custom autocomplete search component the xul text
box element supports an autocomplete mechanism that is used to create a text
box with a popup containing a list of possible completions for what the user has started to type.
...these pages document thunderbird and the mailnews backend which is also used in other projects such as seamonkey and post
box.
DOM Property Viewer - Firefox Developer Tools
to enable it, open the developer tool settings and check the "dom"
box under "default firefox developer tools".
... the tool
box will appear at the bottom of the browser window, with the dom property viewer activated.
... it's just called "dom" in the tool
box.
... refreshing the display if the dom changes you can hit the refresh button to update the display: filtering there is a search
box within the toolbar: this filters the list to show only items which match the search term.
Paint Flashing Tool - Firefox Developer Tools
using the paint flashing tool open the tool
box, then click the icon labeled "highlight painted area": then try using the page.
..., there are two main sources of repaints: moving the mouse over links makes the browser repaint them, because they have a style applied using the :hover pseudo-class scrolling makes the browser repaint the new part of the page coming into view at the bottom of the screen, and also the scrollbar at the top-right to deactivate paint flashing, click the "highlight painted area" icon in the tool
box again.
... <body> <div id="container"> <div class="moving-
box" id="moving-
box-left-margin">transition using margin-left</div> <div class="moving-
box" id="moving-
box-transform">transition using transform</div> </div> </body> #container { border: 1px solid; } .moving-
box { height: 20%; width:20%; margin: 2%; padding: 2%; background-color: blue; color: white; font-size: 24px; } #moving-
box-left-margin { transition: margin-left 4...
...s; } #moving-
box-transform { transition: transform 4s; } body:hover #moving-
box-left-margin{ margin-left: 74%; } body:hover #moving-
box-transform { transform: translate(300%); } to see the transition, move the mouse into the space below: now switch paint flashing on, and try it again.
BeforeUnloadEvent - Web APIs
when a non-empty string is assigned to the returnvalue event property, a dialog
box appears, asking the users for confirmation to leave the page (see example below).
...some implementations only show the dialog
box if the frame or any embedded frame receives a user gesture or user interaction.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" 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">event</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" stroke="#d4dde4"/><a xlink:href="/...
... bubbles no cancelable yes target objects defaultview interface event examples window.addeventlistener("beforeunload", function( event ) { event.returnvalue = "\o/"; }); // is equivalent to window.addeventlistener("beforeunload", function( event ) { event.preventdefault(); }); webkit-derived browsers don't follow the spec for the dialog
box.
GlobalEventHandlers.onpointerdown - Web APIs
var target
box = document.getelementbyid("target"); target
box.onpointerdown = handledown; function handledown(evt) { var action; switch(evt.pointertype) { case "mouse": action = "clicking"; break; case "pen": action = "tapping"; break; case "touch": action = "touching"; break; default: action = "interacting with"; break; } target
box.inn...
... the handledown() function, in turn, looks at the value of pointertype to determine what kind of pointing device was used, then uses that information to customize a string to replace the contents of the target
box.
... we also have a handler for pointerup events: target
box.onpointerup = handleup; function handleup(evt) { target
box.innerhtml = "tap me, click me, or touch me!"; evt.preventdefault(); } this code's job is to just restore the original text into the target
box after the user's interaction with the element ends (for example, when they release the mouse button, or when they lift the stylus or finger from the screen).
...try tapping, clicking, or touching the
box and see what happens.
GlobalEventHandlers.ontransitionend - Web APIs
html this simply creates a <div> which we'll style with css below to make into a
box that resizes and changes color and such.
... <div class="
box"></div> css the css below styles the
box and applies a transition effect which makes the
box's color and size change, and causes the
box to rotate, while the mouse cursor hovers over it.
... .
box { margin-left: 70px; margin-top: 30px; border-style: solid; border-width: 1px; display: block; width: 100px; height: 100px; background-color: #0000ff; color: #ffffff; padding: 20px; font: bold 1.6em "helvetica", "arial", sans-serif; transition: width 2s, height 2s, background-color 2s, transform 2s, color 2s; } .
box:hover { background-color: #ffcccc; color: #000000; width: 200px; height: 200px; transform: rotate(180deg); } javascript next, we need to establish our event handlers to change the text content of the
box when the transition begins and ends.
... let
box = document.queryselector(".
box");
box.ontransitionrun = function(event) {
box.innerhtml = "zooming..."; }
box.ontransitionend = function(event) {
box.innerhtml = "done!"; } result the resulting content looks like this: notice what happens when you hover your mouse cursor over the
box, then move it away.
LocalFileSystem - Web APIs
the localfilesystem interface of the file system api gives you access to a sand
boxed file system.
... creating new storage you request access to a sand
boxed file system by calling window.requestfilesystem().
...(an older version of the api is described at managing html5 offline storage.) working within a single origin the file system is sand
boxed to a single origin.
...you access a sand
boxed file system by requesting a localfilesystem object using this global method, window.requestfilesystem().
MouseEvent.pageX - Web APIs
javascript var
box = document.queryselector(".
box"); var pagex = document.getelementbyid("x"); var pagey = document.getelementbyid("y"); function updatedisplay(event) { pagex.innertext = event.pagex; pagey.innertext = event.pagey; }
box.addeventlistener("mousemove", updatedisplay, false);
box.addeventlistener("mouseenter", updatedisplay, false);
box.addeventlistener("mouseleave", updatedisplay, false); the j...
... html <div class="
box"> <p> move the mouse around in this
box to watch its coordinates change.
... </p> <p> <code>pagex</code>: <span id="x">n/a</span> </p> <p> <code>pagey</code>: <span id="y">n/a</span> </p> </div> the html is simple; the
box we'll be watching for mouse events on is given the class "
box".
... .
box { width: 400px; height: 250px; border: 2px solid darkblue; background-color: blue; color: white; font: 16px "zilla", "open sans", "helvetica", "arial", sans-serif; } result try this out here: specifications specification status comment css object model (cssom) view modulethe definition of 'pagex' in that specification.
RTCDataChannel: open event - Web APIs
it enables the message input
box and send button as well as enabling the disconnect button and disabling the connect button.
... finally, the message input
box is focused so the user can immediately begin to type.
... dc.addeventlistener("open", ev => { messageinput
box.disabled = false; sendmessagebutton.disabled = false; disconnectbutton.disabled = false; connectbutton.disabled = true; messageinput
box.focus(); }, false); this can also be done by directly setting the value of the channel's onopen event handler property.
... dc.onopen = ev => { messageinput
box.disabled = false; sendmessagebutton.disabled = false; disconnectbutton.disabled = false; connectbutton.disabled = true; messageinput
box.focus(); } ...
ResizeObserverEntry.target - Web APIs
this example includes a green
box, sized as a percentage of the viewport size.
... when the viewport size is changed, the
box's rounded corners change in proportion to the size of the
box.
... we could just implement this using border-radius with a percentage, but that quickly leads to ugly-looking elliptical corners; this solution gives you nice square corners that scale with the
box size.
... const resizeobserver = new resizeobserver(entries => { for (let entry of entries) { if(entry.content
boxsize) { entry.target.style.borderradius = math.min(100, (entry.content
boxsize.inlinesize/10) + (entry.content
boxsize.blocksize/10)) + 'px'; } else { entry.target.style.borderradius = math.min(100, (entry.contentrect.width/10) + (entry.contentrect.height/10)) + 'px'; } } }); resizeobserver.observe(document.queryselector('div')); specifications specification...
Using the Screen Capture API - Web APIs
setup first, some constants are set up to reference the elements on the page to which we'll need access: the <video> into which the captured screen contents will be streamed, a
box into which logged output will be drawn, and the start and stop buttons that will turn on and off capture of screen imagery.
...msg => logelem.innerhtml += `${msg}<br>`; console.error = msg => logelem.innerhtml += `<span class="error">${msg}</span><br>`; console.warn = msg => logelem.innerhtml += `<span class="warn">${msg}<span><br>`; console.info = msg => logelem.innerhtml += `<span class="info">${msg}</span><br>`; this allows us to use the familiar console.log(), console.error(), and so on to log information to the log
box in the document.
... the dumpoptionsinfo() function—which we will look at in a moment—dumps information about the stream to the log
box for educational purposes.
... if any of that fails, the catch() clause outputs an error message to the log
box.
Storage Access API - Web APIs
in addition, sand
boxed <iframe>s cannot be granted storage access by default for security reasons.
... the api therefore also adds the allow-storage-access-by-user-activation sand
box token.
... the embedding website needs to add this to allow storage access requests to be successful, along with allow-scripts and allow-same-origin to allow it to call the api, and execute in an origin that can have cookies: <iframe sand
box="allow-storage-access-by-user-activation allow-scripts allow-same-origin"> ...
... extensions to <iframe> sand
box the <iframe> element's sand
box attribute has a new token, allow-storage-access-by-user-activation, which permits sand
boxed <iframe>s to use the storage access api to request storage access.
Signaling and video calling - Web APIs
although it's sdp, even this doesn't matter so much: the content of the message going through the signaling server is, in effect, a black
box.
...this requires video elements, and a button to hang up the call: <div class="flexchild" id="camera-container"> <div class="camera-
box"> <video id="received_video" autoplay></video> <video id="local_video" autoplay muted></video> <button id="hangup-button" onclick="hangupcall();" disabled> hang up </button> </div> </div> the page structure defined here is using <div> elements, giving us full control over the page layout by enabling the use of css.
... function handleuserlistmsg(msg) { var i; var listelem = document.queryselector(".userlist
box"); while (listelem.firstchild) { listelem.removechild(listelem.firstchild); } msg.users.foreach(function(username) { var item = document.createelement("li"); item.appendchild(document.createtextnode(username)); item.addeventlistener("click", invite, false); listelem.appendchild(item); }); } after getting a reference to the <ul> which contains the list of user names...
...since the element is configured to automatically play incoming video, the stream begins playing in our local preview
box.
Using DTMF with WebRTC - Web APIs
initialization when the page loads, we do some basic setup: we fetch references to the dial button and the log output
box elements, and we use addeventlistener() to add an event listener to the dial button so that clicking it calls the connectanddial() function to begin the connection process.
...if addicecandidate() fails, the catch() clause outputs the error to our log
box.
...if addicecandidate() fails, the catch() clause outputs the error to our log
box.
... logging a simple log() function is used throughout the code to append html to a <div>
box for displaying status and errors to the user.
Window - Web APIs
<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;" view
box="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/window" target="_top"><rect x="1" y="1" width="75" height="50" fill="#f4f7f8" 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">window</text></a></svg></div> a:hover text ...
... window.dialogarguments read only gets the arguments passed to the window (if it's a dialog
box) at the time window.showmodaldialog() was called.
... event handlers implemented from elsewhere globaleventhandlers.onabort called when the loading of a resource has been aborted, such as by a user canceling the load while it is still in progress windoweventhandlers.onafterprint called when the print dialog
box is closed.
... windoweventhandlers.onbeforeprint called when the print dialog
box is opened.
Using XMLHttpRequest - Web APIs
*/ for (nfile = 0; nfile < ofield.files.length; this.segments.push(ffilter(ofield.name) + "=" + ffilter(ofield.files[nfile++].name))); } } else if ((sfieldtype !== "radio" && sfieldtype !== "check
box") || ofield.checked) { /* note: this will submit _all_ submit buttons.
...female</label><br /> password: <input type="password" name="secret" /><br /> what do you prefer: <select name="image_type"> <option>books</option> <option>cinema</option> <option>tv</option> </select> </p> <p> post your photos: <input type="file" multiple name="photos[]"> </p> <p> <input id="vehicle_bike" type="check
box" name="vehicle[]" value="bike" /> <label for="vehicle_bike">i have a bike</label><br /> <input id="vehicle_car" type="check
box" name="vehicle[]" value="car" /> <label for="vehicle_car">i have a car</label> </p> <p> describe yourself:<br /> <textarea name="description" cols="50" rows="8"></textarea> </p> <p> <input type="submit" value="submit" />...
... ofield.getattribute("type").touppercase() : "text"; if (sfieldtype === "file") { for (nfile = 0; nfile < ofield.files.length; ssearch += "&" + escape(ofield.name) + "=" + escape(ofield.files[nfile++].name)); } else if ((sfieldtype !== "radio" && sfieldtype !== "check
box") || ofield.checked) { ssearch += "&" + escape(ofield.name) + "=" + escape(ofield.value); } } oreq.open("get", oformelement.action.replace(/(?:\?.*)?$/, ssearch.replace(/^&/, "?")), true); oreq.send(null); } } </script> </head> <body> <h1>sending forms with formdata</h1> <h2>using the get method</h2> <form action="register.php" method="get" onsubmit="ajaxsubmit(this...
...female</label><br /> password: <input type="password" name="secret" /><br /> what do you prefer: <select name="image_type"> <option>books</option> <option>cinema</option> <option>tv</option> </select> </p> <p> post your photos: <input type="file" multiple name="photos[]"> </p> <p> <input id="vehicle_bike" type="check
box" name="vehicle[]" value="bike" /> <label for="vehicle_bike">i have a bike</label><br /> <input id="vehicle_car" type="check
box" name="vehicle[]" value="car" /> <label for="vehicle_car">i have a car</label> </p> <p> describe yourself:<br /> <textarea name="description" cols="50" rows="8"></textarea> </p> <p> <input type="submit" value="submit" />...
-webkit-mask-position-x - CSS: Cascading Style Sheets
00%; -webkit-mask-position-x: -50%; /* <length> values */ -webkit-mask-position-x: 50px; -webkit-mask-position-x: -1cm; /* multiple values values */ -webkit-mask-position-x: 50px, 25%, -3em; /* global values */ -webkit-mask-position-x: inherit; -webkit-mask-position-x: initial; -webkit-mask-position-x: unset; initial value0%applies toall elementsinheritednopercentagesrefer to the size of the
box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete syntax values <length-percentage> a length indicating the position of the left edge of the image relative to the
box's left padding edge.
... percentages are calculated against the horizontal dimension of the
box padding area.
... that means, a value of 0% means the left edge of the image is aligned with the
box's left padding edge and a value of 100% means the right edge of the image is aligned with the
box's right padding edge.
... formal definition initial value0%applies toall elementsinheritednopercentagesrefer to the size of the
box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete formal syntax [ <length-percentage> | left | center | right ]#where <length-percentage> = <length> | <percentage> examples horizontally positioning a mask image .exampleone { -webkit-mask-image: url(mask.png); -webkit-mask-position-x: right; } .exampletwo { -webkit-mask-image: url(mask.png); -webkit-mask-position-x: 25%; } specifications not part of any standard.
-webkit-mask-position-y - CSS: Cascading Style Sheets
00%; -webkit-mask-position-y: -50%; /* <length> values */ -webkit-mask-position-y: 50px; -webkit-mask-position-y: -1cm; /* multiple values values */ -webkit-mask-position-y: 50px, 25%, -3em; /* global values */ -webkit-mask-position-y: inherit; -webkit-mask-position-y: initial; -webkit-mask-position-y: unset; initial value0%applies toall elementsinheritednopercentagesrefer to the size of the
box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete syntax values <length-percentage> a length indicating the position of the top side of the image relative to the
box's top padding edge.
... percentages are calculated against the vertical dimension of the
box padding area.
... a value of 0% means the top edge of the image is aligned with the
box's top padding edge and a value of 100% means the bottom edge of the image is aligned with the
box's bottom padding edge.
... formal definition initial value0%applies toall elementsinheritednopercentagesrefer to the size of the
box itselfcomputed valuefor <length> the absolute value, otherwise a percentageanimation typediscrete formal syntax [ <length-percentage> | top | center | bottom ]#where <length-percentage> = <length> | <percentage> examples vertically positioning a mask image .exampleone { -webkit-mask-image: url(mask.png); -webkit-mask-position-y: bottom; } .exampletwo { -webkit-mask-image: url(mask.png); -webkit-mask-position-y: 25%; } specifications not part of any standard.
:empty - CSS: Cascading Style Sheets
/* selects any <div> that contains no content */ div:empty { background: lime; } syntax :empty examples html <div class="
box"><!-- i will be lime.
... --></div> <div class="
box">i will be pink.</div> <div class="
box"> <!-- i will be pink in older browsers because of the whitespace around this comment.
... --> </div> <div class="
box"> <p><!-- i will be pink in all browsers because of the non-collapsible whitespace and elements around this comment.
... --></p> </div> css body { display: flex; justify-content: space-around; } .
box { background: pink; height: 80px; width: 80px; } .
box:empty { background: lime; } result accessibility concerns assistive technology such as screen readers cannot parse interactive content that is empty.
size - CSS: Cascading Style Sheets
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.
...the longest side of the
box is horizontal).
...the longest side of the
box is vertical).
...the first value corresponds to the width of the page
box and the second one corresponds to its height.
@page - CSS: Cascading Style Sheets
syntax @page { margin: 1cm; } @page :first { margin: 2cm; } descriptors size specifies the target size and orientation of the page
box’s containing block.
... in the general case, where one page
box is rendered onto one page sheet, it also indicates the size of the destination page sheet.
... bleed specifies the extent beyond the page
box at which the page rendering is clipped.
...| <page-margin-
box> <page-body>where <page-selector> = <pseudo-page>+ | <ident> <pseudo-page>*<page-margin-
box> = <page-margin-
box-type> '{' <declaration-list> '}'where <pseudo-page> = : [ left | right | first | blank ]<page-margin-
box-type> = @top-left-corner | @top-left | @top-center | @top-right | @top-right-corner | @bottom-left-corner | @bottom-left | @bottom-center | @bottom-right | @bottom-right-corner | @le...
Handling Overflow in Multicol - CSS: Cascading Style Sheets
in this guide we look at how multicol deals with overflow, both inside the column
boxes and in situations where there is more content than will fit into the container.
... overflow inside column
boxes an overflow situation happens when an item's size is larger than the column
box.
... in this situation, the content should visibly overflow into the next column, rather than be clipped by the column
box.
... if you want an image to size down to fit the column
box, the standard responsive images solution of setting max-width: 100% will achieve that for you.
Ordering Flex Items - CSS: Cascading Style Sheets
new layout methods such as flex
box and grid bring with them the possibility of controlling the order of content.
... in this article we will take a look at ways in which you can change the visual order of your content when using flex
box.
... in the live code example below i have items laid out using flex
box.
... flex
box and the keyboard navigation disconnect html source order vs css display order the responsive order conflict for keyboard focus use cases for order there are sometimes places where the fact that the logical and therefore reading order of flex items is separate from the visual order, is helpful.
In Flow and Out of Flow - CSS: Cascading Style Sheets
the list is displayed using flex
box to arrange the items into a row, however it too is participating in block and inline layout - the container has an outside display type of block.
... you can see the background colour of the following paragraph running underneath, it is only the line
boxes of that paragraph that have been shortened to cause the effect of wrapping content around the float.
... the
box of our paragraph is still displaying according to the rules of normal flow.
... this is why, to make space around a floated item, you must add a margin to the item, in order to push the line
boxes away from it.
Understanding CSS z-index - CSS: Cascading Style Sheets
in css 2.1, each
box has a position in three dimensions.
... in addition to their horizontal and vertical positions,
boxes lie along a "z-axis" and are formatted one on top of the other.
... z-axis positions are particularly relevant when
boxes overlap visually.
... (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).
Using CSS transforms - CSS: Cascading Style Sheets
only elements positioned by the
box model can be transformed.
... as a rule of thumb, an element is positioned by the
box model if it has display: block.
... html the html below creates four copies of the same
box, with the perspective set at different values.
...it also includes classes for the container
box and the cube itself, as well as each of its faces.
CSS reference - CSS: Cascading Style Sheets
-start-widthborder-inline-styleborder-inline-widthborder-leftborder-left-colorborder-left-styleborder-left-widthborder-radiusborder-rightborder-right-colorborder-right-styleborder-right-widthborder-spacingborder-start-end-radiusborder-start-start-radiusborder-styleborder-topborder-top-colorborder-top-left-radiusborder-top-right-radiusborder-top-styleborder-top-widthborder-widthbottom@bottom-center
box-decoration-break
box-shadow
box-sizingbreak-afterbreak-beforebreak-insidebrightness()ccalc()caption-sidecaret-colorch@character-variantcharacter-variant()@charset:checkedcircle()clamp()clearclipclip-pathcm<color>colorcolor-adjustcolumn-countcolumn-fillcolumn-gapcolumn-rulecolumn-rule-colorcolumn-rule-stylecolumn-rule-widthcolumn-spancolumn-widthcolumnsconic-gradient()containcontentcontrast()<counte...
...r>counter-incrementcounter-resetcounter-set@counter-stylecounters()cross-fade()cubic-bezier()::cue::cue-regioncursor<custom-ident>d:defaultdeg<dimension>:dirdirection:disableddisplay<display-
box><display-inside><display-internal><display-legacy><display-listitem><display-outside>dpcmdpidppxdrop-shadow()eelement()ellipse()em:emptyempty-cells:enabledenv()exffallback (@counter-style)filter<filter-function>:first:first-child::first-letter (:first-letter)::first-line (:first-line):first-of-typefit-content()<flex>flexflex-basisflex-directionflex-flowflex-growflex-shrinkflex-wrapfloat:focusfont@font-facefont-familyfont-family (@font-face)font-feature-settingsfont-feature-settings (@font-face)@font-feature-valuesfont-kerningfont-language-overridefont-optical-sizingfont-sizefont-size-adjustfont-stretc...
...-decoration-colortext-decoration-linetext-decoration-skip-inktext-decoration-styletext-decoration-thicknesstext-emphasistext-emphasis-colortext-emphasis-positiontext-emphasis-styletext-indenttext-justifytext-orientationtext-overflowtext-renderingtext-shadowtext-transformtext-underline-offsettext-underline-position<time><time-percentage><timing-function>top@top-centertouch-actiontransformtransform-
box<transform-function>transform-origintransform-styletransitiontransition-delaytransition-durationtransition-propertytransition-timing-functiontranslatetranslate()translate3d()translatex()translatey()translatez()turnuunicode-bidiunicode-range (@font-face)unset<url>url()user-zoom (@viewport)v:validvar()vertical-alignvh@viewportviewport-fit (@viewport)visibility:visitedvmaxvminvwwwhite-spacewidowswidt...
... concepts syntax and semantics css syntax at-rules cascade comments descriptor inheritance shorthand properties specificity value definition syntax css unit and value types values actual value computed value initial value resolved value specified value used value layout block formatting context
box model containing block layout mode margin collapsing replaced elements stacking context visual formatting model dom-css / cssom major object types documentorshadowroot.stylesheets stylesheets[i].cssrules cssrules[i].csstext (selector & style) cssrules[i].selectortext htmlelement.style htmlelement.style.csstext (just style) element.classname element.classlist important methods...
Scaling of SVG backgrounds - CSS: Cascading Style Sheets
in each case, we show what the source image looks like rendered in a 150x150
box, and provide a link to the svg source.
...for example, preserving a 3:4 intrinsic aspect ratio for a 300x200
box with contain means drawing a 150x200 background.
... contain case background: url(100px-height-3x4-ratio.svg); background-size: contain; the rendered output looks like this: notice how the entire image is rendered, fitting as best as possible into the
box without clipping any of it away.
... cover case background: url(100px-height-3x4-ratio.svg); background-size: cover; the rendered output looks like this: here, the 3:4 ratio is preserved while still stretching the image to fill the entire
box.
Shorthand properties - CSS: Cascading Style Sheets
similarly, the most common font-related properties can be defined using the shorthand font, and the different margins around a
box can be defined using the margin shorthand.
...handling of these cases are grouped in several categories: shorthands handling properties related to edges of a
box, like border-style, margin or padding, always use a consistent 1-to-4-value syntax representing those edges: the 1-value syntax: border-width: 1em — the unique value represents all edges the 2-value syntax: border-width: 1em 2em — the first value represents the vertical, that is top and bottom, edges, the second the horizontal ones, that is the left...
... similarly, shorthands handling properties related to corners of a
box, like border-radius, always use a consistent 1-to-4-value syntax representing those corners: the 1-value syntax: border-radius: 1em — the unique value represents all corners the 2-value syntax: border-radius: 1em 2em — the first value represents the top left and bottom right corner, the second the top right and bottom left ones.
... see also 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.
animation - CSS: Cascading Style Sheets
ear 1s slidein;</div> <div class="animation a2"></div> </div> </div> <div class="row"> <div class="cell"> <button class="pause" title="pause"></button> </div> <div class="cell flx"> <div class="overlay">animation: 3s slidein;</div> <div class="animation a3"></div> </div> </div> </div> </div> html,body { height: 100%;
box-sizing: border-
box; } pre { margin-bottom: 0; } svg { width: 1.5em; height: 1.5em; } button { width: 27px; height: 27px; background-size: 16px; background-position: center; background-repeat: no-repeat; border-radius: 3px; cursor: pointer; } button.play { background-image: url('data:image/svg+xml;charset=utf-8,%3csvg%20xmlns%3d%22http%3a%2f%2fwww.w3.org%2f2000%2fsvg%22%20viewbo...
...2c4%20l11%2c4%20l11%2c13%20l9%2c13%20z%22%20%2f%3e%3cpath%20id%3d%22restart%22%20d%3d%22m13%2c9%20a5%2c5%2c1%2c1%2c1%2c8%2c4%20l8%2c2%20l12%2c5%20l8%2c8%20l8%2c6%20a3%2c3%2c1%2c1%2c0%2c11%2c9%20a1%2c1%2c1%2c1%2c1%2c13%2c9%20z%22%20%2f%3e%3c%2fsvg%3e#play'); } button.pause { background-image: url('data:image/svg+xml;charset=utf-8,%3csvg%20xmlns%3d%22http%3a%2f%2fwww.w3.org%2f2000%2fsvg%22%20view
box%3d%220%200%2016%2016%22%3e%3cstyle%3epath%20%7bdisplay%3anone%7d%20path%3atarget%7bdisplay%3ablock%7d%3c%2fstyle%3e%3cpath%20id%3d%22play%22%20d%3d%22m3%2c3%20l3%2c13%20l13%2c8%20z%22%20%2f%3e%3cpath%20id%3d%22pause%22%20d%3d%22m5%2c4%20l7%2c4%20l7%2c13%20l5%2c13%20z%20m9%2c4%20l11%2c4%20l11%2c13%20l9%2c13%20z%22%20%2f%3e%3cpath%20id%3d%22restart%22%20d%3d%22m13%2c9%20a5%2c5%2c1%2c1%2c1%2c8%2c4%2...
...0l8%2c2%20l12%2c5%20l8%2c8%20l8%2c6%20a3%2c3%2c1%2c1%2c0%2c11%2c9%20a1%2c1%2c1%2c1%2c1%2c13%2c9%20z%22%20%2f%3e%3c%2fsvg%3e#pause'); } button.restart { background-image: url('data:image/svg+xml;charset=utf-8,%3csvg%20xmlns%3d%22http%3a%2f%2fwww.w3.org%2f2000%2fsvg%22%20view
box%3d%220%200%2016%2016%22%3e%3cstyle%3epath%20%7bdisplay%3anone%7d%20path%3atarget%7bdisplay%3ablock%7d%3c%2fstyle%3e%3cpath%20id%3d%22play%22%20d%3d%22m3%2c3%20l3%2c13%20l13%2c8%20z%22%20%2f%3e%3cpath%20id%3d%22pause%22%20d%3d%22m5%2c4%20l7%2c4%20l7%2c13%20l5%2c13%20z%20m9%2c4%20l11%2c4%20l11%2c13%20l9%2c13%20z%22%20%2f%3e%3cpath%20id%3d%22restart%22%20d%3d%22m13%2c9%20a5%2c5%2c1%2c1%2c1%2c8%2c4%20l8%2c2%20l12%2c5%20l8%2c8%20l8%2c6%20a3%2c3%2c1%2c1%2c0%2c11%2c9%20a1%2c1%2c1%2c1%2c1%2c13%2c9%20z%22%20%2f%3e%3c%2fsvg%3e...
...#restart'); } .grid { width: 100%; height: 100%; display: flex; background: #eee; font: 1em monospace; } .row { display: flex; flex: 1 auto; flex-direction: row; flex-wrap: wrap; justify-content: space-between; } .col { display: flex; flex: 1 auto; flex-direction: column; } .cell {
box-sizing: border-
box; margin: .5em; padding: 0; background-color: #fff; overflow: hidden; text-align: left; } .flx { flex: 1 0; } .note { background: #fff3d4; padding: 1em; margin: .5em; font: .8em sans-serif; text-align: left; flex: none; } .overlay { padding: .5em; } @keyframes slidein { from { transform: scalex(0); } to { transform: scalex(1); } } .a1 { animation: 3s ease-in 1s 2 reverse both paused slidein; } .a2 { animation: 3s linear 1s slidei...
border-top-right-radius - CSS: Cascading Style Sheets
percentages for the horizontal axis refer to the width of the
box, percentages for the vertical axis refer to the height of the
box.
...it also applies to ::first-letter.inheritednopercentagesrefer to the corresponding dimension of the border
boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples live example code an arc of circle is used as the border div { border-top-right-radius: 40px 40px; } an arc of ellipse is used as the border div...
... { border-top-right-radius: 40px 20px; } the
box is a square: an arc of circle is used as the border div { border-top-right-radius: 40%; } .
... the
box is not a square: an arc of ellipse is used as the border div { border-top-right-radius: 40%; } the background color is clipped at the border div { border-top-right-radius:40%; border-style: black 3px double; background-color: rgb(250,20,70); background-clip: content-
box; } specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-right-radius' in that specification.
<display-legacy> - CSS: Cascading Style Sheets
syntax valid <display-legacy> values: inline-block the element generates a block element
box that will be flowed with surrounding content as if it were a single inline
box (behaving much like a replaced element would).
...it behaves like an html <table> element, but as an inline
box, rather than a block-level
box.
... inside the table
box is a block-level context.
... inline-flex the element behaves like an inline element and lays out its content according to the flex
box model.
fit-content() - CSS: Cascading Style Sheets
the function can also be used as laid out
box size for width, height, min-width, min-height, max-width and max-height, where the maximum and minimum sizes refer to the content size.
...otherwise it is relative to the available inline size or block size of the laid out
box depending on the writing mode.
... </div> <div>flexible item</div> </div> css #container { display: grid; grid-template-columns: fit-content(300px) fit-content(300px) 1fr; grid-gap: 5px;
box-sizing: border-
box; height: 200px; width: 100%; background-color: #8cffa0; padding: 10px; } #container > div { background-color: #8ca0ff; padding: 5px; } result specifications specification status comment css
box sizing module level 3the definition of 'fit-content()' in that specification.
... working draft defines the function as laid out
box size for width, height, min-width, min-height, max-width and max-height.
height - CSS: Cascading Style Sheets
if
box-sizing is set to border-
box, however, it instead determines the height of the border area.
... mdn understanding wcag, guideline 1.4 explanations understanding success criterion 1.4.4 | w3c understanding wcag 2.0 formal definition initial valueautoapplies toall elements but non-replaced inline elements, table columns, and column groupsinheritednopercentagesthe percentage is calculated with respect to the height of the generated
box's containing block.
... </div> </div> css div { width: 250px; margin-bottom: 5px; border: 2px solid blue; } #taller { height: 50px; } #shorter { height: 25px; } #parent { height: 100px; } #child { height: 50%; width: 75%; } result specifications specification status comment css
box sizing module level 4the definition of 'height' in that specification.
... editor's draft css
box sizing module level 3the definition of 'height' in that specification.
image() - CSS: Cascading Style Sheets
the first two represent the x and y coordates for the starting point of the
box that will be created.
... the third value is the width of the
box, and the last value is the height.
... displaying a section of the background image <div class="
box">hover over me.
... what cursor do you see?</div> .
box:hover { cursor: image("https://mdn.mozillademos.org/files/16411/sprite.png#xywh=32,64,16,16"); } when the user hovers over the
box, the cursor will change to display the 16x16 px section of the sprite image, starting at x=32 and y=64.
margin-left - CSS: Cascading Style Sheets
the vertical margins of two adjacent
boxes may fuse.
... flex
box layout mode formal definition initial value0applies toall elements, except elements with table display types other than table-caption, table and inline-table.
... it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> | auto examples setting left margin using pixels and percentages .content { margin-left: 5%; } .side
box { margin-left: 10px; } .logo { margin-left: -5px; } specifications specification status comment css basic
box modelthe definition of 'margin-left' in that specification.
... css flexible
box layout modulethe definition of 'margin-left' in that specification.
margin-right - CSS: Cascading Style Sheets
the vertical margins of two adjacent
boxes may fuse.
... flex
box layout mode formal definition initial value0applies toall elements, except elements with table display types other than table-caption, table and inline-table.
... it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> | auto examples setting right margin using pixels and percentages .content { margin-right: 5%; } .side
box { margin-right: 10px; } .logo { margin-right: -5px; } specifications specification status comment css basic
box modelthe definition of 'margin-right' in that specification.
... working draft no significant change css flexible
box layout modulethe definition of 'margin-right' in that specification.
min-height - CSS: Cascading Style Sheets
none no limit on the size of the
box.
... formal definition initial valueautoapplies toall elements but non-replaced inline elements, table columns, and column groupsinheritednopercentagesthe percentage is calculated with respect to the height of the generated
box's containing block.
...pecified or the absolute lengthanimation typea length, percentage or calc(); formal syntax auto | <length> | <percentage> | min-content | max-content | fit-content(<length-percentage>)where <length-percentage> = <length> | <percentage> examples setting min-height table { min-height: 75%; } form { min-height: 0; } specifications specification status comment css
box sizing module level 4the definition of 'min-height' in that specification.
... editor's draft css
box sizing module level 3the definition of 'min-height' in that specification.
radial-gradient() - CSS: Cascading Style Sheets
the possible values are: keyword description closest-side the gradient's ending shape meets the side of the
box closest to its center (for circles) or meets both the vertical and horizontal sides closest to the center (for ellipses).
... closest-corner the gradient's ending shape is sized so that it exactly meets the closest corner of the
box from its center.
... farthest-side similar to closest-side, except the ending shape is sized to meet the side of the
box farthest from its center (or vertical and horizontal sides).
... farthest-corner the default value, the gradient's ending shape is sized so that it exactly meets the farthest corner of the
box from its center.
repeating-radial-gradient() - CSS: Cascading Style Sheets
the possible values are: keyword description closest-side the gradient's ending shape meets the side of the
box closest to its center (for circles) or meets both the vertical and horizontal sides closest to the center (for ellipses).
... closest-corner the gradient's ending shape is sized so that it exactly meets the closest corner of the
box from its center.
... farthest-side similar to closest-side, except the ending shape is sized to meet the side of the
box farthest from its center (or vertical and horizontal sides).
... farthest-corner the gradient's ending shape is sized so that it exactly meets the farthest corner of the
box from its center.
scroll-behavior - CSS: Cascading Style Sheets
the scroll-behavior css property sets the behavior for a scrolling
box when scrolling is triggered by the navigation or cssom scrolling apis.
... values auto the scrolling
box scrolls instantly.
... smooth the scrolling
box scrolls in a smooth fashion using a user-agent-defined timing function over a user-agent-defined period of time.
... formal definition initial valueautoapplies toscrolling
boxesinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | smooth examples setting smooth scroll behavior html <nav> <a href="#page-1">1</a> <a href="#page-2">2</a> <a href="#page-3">3</a> </nav> <scroll-container> <scroll-page id="page-1">1</scroll-page> <scroll-page id="page-2">2</scroll-page> <scroll-page id="page-3">3</scroll-page> </scroll-container> css a { display: inline-block; width: 50px; text-decoration: none; } nav, scroll-container { display: block; margin: 0 auto; text-align: center; } nav { width: 339px; padding: 5px; border: 1px solid black; } scroll-container { display: block; width: 350px; he...
<shape> - CSS: Cascading Style Sheets
rect() rect(top, right, bottom, left) values top is a <length> representing the offset for the top of the rectangle relative to the top border of the element's
box.
... right is a <length> representing the offset for the right of the rectangle relative to the left border of the element's
box.
... bottom is a <length> representing the offset for the bottom of the rectangle relative to the top border of the element's
box.
... left is a <length> representing the offset for the left of the rectangle relative to the left border of the element's
box.
vertical-align - CSS: Cascading Style Sheets
the vertical-align css property sets vertical alignment of an inline, inline-block or table-cell
box.
... the vertical-align property can be used in two contexts: to vertically align an inline element's
box inside its containing line
box.
...align:0.2em" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> -1em:<img style="vertical-align:-1em" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> 20%:<img style="vertical-align:20%" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> -100%:<img style="vertical-align:-100%" src="https://udn.realityripple.com/samples/16/ed9c61c3b6.png"/> </p> #* {
box-sizing: border-
box; } img { margin-right: 0.5em; } p { height: 3em; padding: 0 .5em; font-family: monospace; text-decoration: underline overline; margin-left: auto; margin-right: auto; width: 80%; } to vertically align the content of a cell in a table: <table> <tr> <td style="vertical-align: baseline">baseline</td> <td style="vertical-align: top">top</td> ...
... middle centers the padding
box of the cell within the row.
CSS: Cascading Style Sheets
css layout at this point we've already looked at css fundamentals, how to style text, and how to style and manipulate the
boxes that your content sits inside.
... now it's time to look at how to place your
boxes in the right place concerning the viewport, and one another.
... we have covered the necessary prerequisites so we can now dive deep into css layout, looking at different display settings, modern layout tools like flex
box, css grid, and positioning, and some of the legacy techniques you might still want to know about.
... css key concepts: the syntax and forms of the language specificity, inheritance and the cascade css units and values
box model and margin collapse the containing block stacking and block-formatting contexts initial, computed, used, and actual values css shorthand properties css flexible
box layout css grid layout media queries animation cookbook the css layout cookbook aims to bring together recipes for common layout patterns, things you might need to implement in your sites.
HTML5 - Developer guides
improvement in <iframe> using the sand
box and srcdoc attributes, authors can now be precise about the level of security and the wished rendering of an <iframe> element.
... new background styling features it is now possible to put shadows on elements using
box-shadow, multiple backgrounds, and css filters.
... you can learn more about these by reading advanced
box effects.
... new presentational layouts in order to improve the flexibility of designs, two new layouts have been added: the css multi-column layouts and css flexible
box layout.
HTML attribute: readonly - HTML: Hypertext Markup Language
the attribute is not supported or relevant to <select> or input types that are already not mutable, such as check
box and radio or cannot, by definition, start with a value, such as the file input type.
... note: only text controls can be made read-only, since for other controls (such as check
boxes and buttons) there is no useful distinction between being read-only and being disabled, so the readonly attribute does not apply.
... example html <div class="group"> <input type="text
box" value="some value" readonly="readonly"/> <label>text
box</label> </div> <div class="group"> <input type="date" value="2020-01-01" readonly="readonly"/> <label>date</label> </div> <div class="group"> <input type="email" value="some value" readonly="readonly"/> <label>email</label> </div> <div class="group"> <input type="password" value="some value" readonly="readonly"/> <label>passwo...
...rd</label> </div> <div class="group"> <textarea readonly="readonly">some value</textarea> <label>message</label> </div> result examples <fieldset> <legend>check
boxes buttons</legend> <p><label> <input type="check
box" name="ch
box" value="regular"> regular </label></p> <p><label> <input type="check
box" name="ch
box" value="readonly" readonly> readonly </label></p> <p><label> <input type="check
box" name="ch
box" value="disabled" disabled> disabled </label></p> </fieldset> <fieldset> <legend>radio buttons</legend> <p><label> <input type="radio" name="radio" value="regular"> regular </label></p> <p><label> <input type="radio" name="radio" value="readonly" readonly> readonly </label></p> <p><label> <input type="radio" name="radio" value="d...
<details>: The Details disclosure element - HTML: Hypertext Markup Language
an input device as well as some form of output device is recommended.</p> </details> the result from this html is this: creating an open disclosure
box to start the <details>
box in its open state, add the boolean open attribute: <details open> <summary>system requirements</summary> <p>requires a computer running an operating system.
... an input device as well as some form of output device is recommended.</p> </details> this results in: customizing the appearance now let's apply some css to customize the appearance of the disclosure
box.
... css details { font: 16px "open sans", calibri, sans-serif; width: 620px; } details > summary { padding: 2px 6px; width: 15em; background-color: #ddd; border: none;
box-shadow: 3px 3px 4px black; cursor: pointer; } details > p { border-radius: 0 0 10px 10px; background-color: #ddd; padding: 2px 6px; margin: 0;
box-shadow: 3px 3px 4px black; } this css creates a look similar to a tabbed interface, where clicking the tab opens it to reveal its contents.
... css details { font: 16px "open sans", calibri, sans-serif; width: 620px; } details > summary { padding: 2px 6px; width: 15em; background-color: #ddd; border: none;
box-shadow: 3px 3px 4px black; cursor: pointer; list-style: none; } details > summary::-webkit-details-marker { display: none; } details > p { border-radius: 0 0 10px 10px; background-color: #ddd; padding: 2px 6px; margin: 0;
box-shadow: 3px 3px 4px black; } this css creates a look similar to a tabbed interface, where activating the tab expands and opens it to reveal its contents.
<dialog>: The Dialog element - HTML: Hypertext Markup Language
the html <dialog> element represents a dialog
box or other interactive component, such as a dismissable alert, inspector, or subwindow.
... examples simple example <dialog open> <p>greetings, one and all!</p> </dialog> advanced example this example opens a pop-up dialog
box that contains a form, when the "update details" button is clicked.
... html <!-- simple pop-up dialog
box containing a form --> <dialog id="favdialog"> <form method="dialog"> <p><label>favorite animal: <select> <option></option> <option>brine shrimp</option> <option>red panda</option> <option>spider monkey</option> </select> </label></p> <menu> <button value="cancel">cancel</button> <button id="confirmbtn" value="default">confirm</button> </menu> </form> </dialog> <menu> <button id="updatedetails">update details</button> </menu> <output aria-live="polite"></output> javascript var updatebutton = document.getelementbyid('updatedetails'); var favdialog = document.getelementbyid('favdialog'); var output
box = document.queryselector('output'); var selectel = document.queryselector('s...
...l(); } else { alert("the <dialog> api is not supported by this browser"); } }); // "favorite animal" input sets the value of the submit button selectel.addeventlistener('change', function onselect(e) { confirmbtn.value = selectel.value; }); // "confirm" button of form triggers "close" on dialog because of [method="dialog"] favdialog.addeventlistener('close', function onclose() { output
box.value = favdialog.returnvalue + " button clicked - " + (new date()).tostring(); }); result specifications specification status comment html living standardthe definition of '<dialog>' in that specification.
<div>: The Content Division element - HTML: Hypertext Markup Language
instead, you should use css properties or techniques such as css grid or css flex
box to align and position <div> elements on the page.
...you name it!</p> </div> the result looks like this: a styled example this example creates a shadowed
box by applying a style to the <div> using css.
... note the use of the class attribute on the <div> to apply the style named "shadow
box" to the element.
... html <div class="shadow
box"> <p>here's a very interesting note displayed in a lovely shadowed
box.</p> </div> css .shadow
box { width: 15em; border: 1px solid #333;
box-shadow: 8px 8px 5px #444; padding: 8px 12px; background-image: linear-gradient(180deg, #fff, #ddd 40%, #ccc); } result specifications specification status comment html living standardthe definition of '<div>' in that specification.
<textarea> - HTML: Hypertext Markup Language
compared to other form elements it is relatively easy to style, with its
box model, fonts, color scheme, etc.
...for gecko, the <textarea> baseline is set on the baseline of the first line of the textarea's first line, on another browser it may be set on the bottom of the <textarea>
box.
...notice how it disappears when you start typing into the
box.
... implicit aria role text
box permitted aria roles no role permitted dom interface htmltextareaelement specifications specification status comment html living standardthe definition of '<textarea>' in that specification.
Strict mode - JavaScript
"
boxed").
... for a normal function, this is always an object: either the provided object if called with an object-valued this; the value,
boxed, if called with a boolean, string, or number this; or the global object if called with an undefined or null this.
... (use call, apply, or bind to specify a particular this.) not only is automatic
boxing a performance cost, but exposing the global object in browsers is a security hazard because the global object provides access to functionality that "secure" javascript environments must restrict.
... thus for a strict mode function, the specified this is not
boxed into an object, and if unspecified, this will be undefined: 'use strict'; function fun() { return this; } console.assert(fun() === undefined); console.assert(fun.call(2) === 2); console.assert(fun.apply(null) === null); console.assert(fun.call(undefined) === undefined); console.assert(fun.bind(true)() === true); that means, among other things, that in browsers it's no longer possible to reference the window object through this inside a strict mode function.
Populating the page: how browsers work - Web Performance
on the web page, most everything is a
box.
...in this phase, taking the viewport size into consideration, the browser determines what the dimensions of all the different
boxes are going to be on the screen.
... taking the size of the viewport as its base, layout generally starts with the body, laying out the dimensions of all the body’s descendants, with each element's
box model properties, providing placeholder space for replaced elements it doesn’t know the dimensions of, such as our image.
...in the painting or rasterization phase, the browser converts each
box calculated in the layout phase to actual pixels on the screen.
stroke-linecap - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following eight elements: <altglyph>, <path>, <polyline>, <line>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg view
box="0 0 6 6" xmlns="http://www.w3.org/2000/svg"> <!-- effect of the (default) "butt" value --> <line x1="1" y1="1" x2="5" y2="1" stroke="black" stroke-linecap="butt" /> <!-- effect of the "round" value --> <line x1="1" y1="3" x2="5" y2="3" stroke="black" stroke-linecap="round" /> <!-- effect of the "square" value --> <line x1="1" y1="5" x2="5" y2="5" stroke="black" ...
... example html,body,svg { height:100% } <svg view
box="0 0 6 4" xmlns="http://www.w3.org/2000/svg"> <!-- effect of the "butt" value --> <path d="m1,1 h4" stroke="black" stroke-linecap="butt" /> <!-- effect of the "butt" value on a zero length path --> <path d="m3,3 h0" stroke="black" stroke-linecap="butt" /> <!-- the following pink lines highlight the position of the path for each stroke --> <path d="m1,1 h4" ...
... example html,body,svg { height:100% } <svg view
box="0 0 6 4" xmlns="http://www.w3.org/2000/svg"> <!-- effect of the "round" value --> <path d="m1,1 h4" stroke="black" stroke-linecap="round" /> <!-- effect of the "round" value on a zero length path --> <path d="m3,3 h0" stroke="black" stroke-linecap="round" /> <!-- the following pink lines highlight the position of the path for each stroke --> <path d="m1,1 ...
... example html,body,svg { height:100% } <svg view
box="0 0 6 4" xmlns="http://www.w3.org/2000/svg"> <!-- effect of the "square" value --> <path d="m1,1 h4" stroke="black" stroke-linecap="square" /> <!-- effect of the "square" value on a zero length path --> <path d="m3,3 h0" stroke="black" stroke-linecap="square" /> <!-- the following pink lines highlight the position of the path for each stroke --> <path d="m...
textLength - SVG: Scalable Vector Graphics
four elements are using this attribute: <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg view
box="0 0 200 60" xmlns="http://www.w3.org/2000/svg"> <text y="20" textlength="6em">small text length</text> <text y="40" textlength="120%">big text length</text> </svg> usage notes value <length-percentage> | <number> default value none animatable yes <length-percentage> this value specifies the width of the space the text will be adjusted to occ...
...it's pretty basic, with a 1000-by-300 pixel space mapped into a 10 centimeter by 3 centimeter
box.
... <svg width="10cm" height="3cm" view
box="0 0 1000 300" xmlns="http://www.w3.org/2000/svg"> <rect x="1" y="1" width="998" height="298" fill="none" stroke="green" stroke-width="2"/> <text id="hello" x="10" y="150" font-family="sans-serif" font-size="60" fill="green"> hello world!
... after updating the text width, the contents of the widthdisplay
box are updated with the new value as well, and we're finished.
y1 - SVG: Scalable Vector Graphics
two elements are using this attribute: <line>, and <lineargradient> html,body,svg { height:100% } <svg view
box="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="1" x2="9" y1="1" y2="5" stroke="red" /> <line x1="1" x2="9" y1="5" y2="5" stroke="green" /> <line x1="1" x2="9" y1="9" y2="5" stroke="blue" /> </svg> line for <line>, y1 defines the y coordinate of the starting point of the line.
... value <length> | <percentage> default value 0 animatable yes example html,body,svg { height:100% } <svg view
box="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="1" x2="9" y1="1" y2="5" stroke="red" /> <line x1="1" x2="9" y1="5" y2="5" stroke="green" /> <line x1="1" x2="9" y1="9" y2="5" stroke="blue" /> </svg> lineargradient for <lineargradient>, y1 defines the y coordinate of the starting point of the gradient vector used to map the gradient stop values.
... the exact behavior of this attribute is influenced by the gradientunits attributs value <length> | <percentage> default value 0% animatable yes example html,body,svg { height:100% } <svg view
box="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- by default the gradient vector start at the top left corner of the bounding
box of the shape it is applied to.
... --> <lineargradient y1="0%" id="g0"> <stop offset="5%" stop-color="black" /> <stop offset="50%" stop-color="red" /> <stop offset="95%" stop-color="black" /> </lineargradient> <rect x="1" y="1" width="8" height="8" fill="url(#g0)" /> <!-- here the gradient vector start at the bottom left corner of the bounding
box of the shape it is applied to.
y2 - SVG: Scalable Vector Graphics
two elements are using this attribute: <line>, and <lineargradient> html,body,svg { height:100% } <svg view
box="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="1" x2="9" y1="5" y2="1" stroke="red" /> <line x1="1" x2="9" y1="5" y2="5" stroke="green" /> <line x1="1" x2="9" y1="5" y2="9" stroke="blue" /> </svg> line for <line>, y2 defines the y coordinate of the ending point of the line.
... value <length> | <percentage> default value 0 animatable yes example html,body,svg { height:100% } <svg view
box="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="1" x2="9" y1="5" y2="1" stroke="red" /> <line x1="1" x2="9" y1="5" y2="5" stroke="green" /> <line x1="1" x2="9" y1="5" y2="9" stroke="blue" /> </svg> lineargradient for <lineargradient>, y2 defines the y coordinate of the ending point of the gradient vector used to map the gradient stop values.
... the exact behavior of this attribute is influenced by the gradientunits attributs value <length> | <percentage> default value 0% animatable yes example html,body,svg { height:100% } <svg view
box="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- by default the gradient vector end at the top right corner of the bounding
box of the shape it is applied to.
... --> <lineargradient y2="0%" id="g0"> <stop offset="5%" stop-color="black" /> <stop offset="50%" stop-color="red" /> <stop offset="95%" stop-color="black" /> </lineargradient> <rect x="1" y="1" width="8" height="8" fill="url(#g0)" /> <!-- here the gradient vector end at the bottom right corner of the bounding
box of the shape it is applied to.
<pattern> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg view
box="0 0 230 100" xmlns="http://www.w3.org/2000/svg"> <defs> <pattern id="star" view
box="0,0,10,10" width="10%" height="10%"> <polygon points="0,0 2,5 0,10 5,8 10,10 8,5 10,0 5,2"/> </pattern> </defs> <circle cx="50" cy="50" r="50" fill="url(#star)"/> <circle cx="180" cy="50" r="40" fill="none" stroke-width="20" stroke="url(#star)"/> </svg> attributes height this attribute determines the height of the pattern tile.
... value type: userspaceonuse|objectbounding
box; default value: userspaceonuse; animatable: yes note: this attribute has no effect if a view
box attribute is specified on the <pattern> element.
... value type: userspaceonuse|objectbounding
box; default value: objectbounding
box; animatable: yes preserveaspectratio this attribute defines how the svg fragment must be deformed if it is embedded in a container with a different aspect ratio.
...; default value: xmidymid meet; animatable: yes view
box this attribute defines the bound of the svg viewport for the pattern fragment.
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
svgcolor and svgicccolor removed never implemented svgelement.focus(), svgelement.blur() not implemented (bug 778654) svgelement.tabindex implemented (bug 778654) document.activeelement implementation status unknown globaleventhandlers on svgelement implementation status unknown options dictionary attribute for svggraphicselement.getb
box() implemented behind the preference svg.new-getb
box.enabled (bug 999964, bug 1019326) allow leading and trailing whitespace in <length>, <angle>, <number> and <integer> implementation status unknown form feed (u+000c) in whitespace implementation status unknown svgelement.xmlbase, svgelement.xmllang and svgelement.xmlspace removed implementation status unkno...
... 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 systems, transformations and units change notes exception for bad values on svgmatrix.skewx() and svgmatrix.skewy() implementation status unknown bounding
box for element with no position at (0, 0) implementation status unknown defer keyword removed from preserveaspectratio attribute removed (bug 1280425) added non-scaling-size, non-rotation and fixed-position keywords for vector-effect property not implemented yet (bug 1318208) vector-effect has no effect within 3d rendering context implementation status unknown ...
...7) display behavior of paint server elements defined by ua style sheet not implemented clipping, masking, and compositing change notes overflow respected on outermost <svg> elements inline in html implementation status unknown interactivity change notes tabindex attribute implemented (bug 778654) bounding-
box on pointer-events not implemented (bug 945187) load, abort, error, and unload instead of svgload, svgabort, svgerror, and svgunload not implemented (bug 620002) only structurally external elements and outermost <svg> element fire load events implementation status unknown resize and scroll instead of svgresize and svgscroll implementation status unknown ...
... xlink:href attribute deprecated in favor of href implemented (bug 1245751) xlink:title attribute deprecated in favor of child <title> implementation status unknown spaces in svg view fragments implementation status unknown pixel: and percent: spatial media fragments implementation status unknown linking to <view> elements does not cause implicit
box transformation to show nearest ancestor <svg> element implementation status unknown unspecified svg view fragment parameters don't cause corresponding attributes to be reset to initial values implementation status unknown viewtarget attribute of <view> and corresponding svg view fragment parameter removed implementation status unknown fragment-only urls are alw...
Porting the Library Detector - Archive of obsolete content
how the library detector works all the work is done inside a single file, librarydetector.xul this contains: a xul overlay a script the xul overlay adds a
box element to the browser's status bar: the script does everything else.
... once the list is built, the switchlibraries() function constructs a xul statusbarpanel element for each library it found, populates it with the icon at the corresponding chrome:// url, and adds it to the
box.
... finally, it listens to gbrowser's tabselect event, to update the contents of the
box for that window.
core/namespace - Archive of obsolete content
let sand
boxes = ns(); function widget(options) { let { element, contentscript } = options; let widget = object.create(widget.prototype); view.call(widget, options.element); sand
boxes(widget).sand
box = cu.sand
box(element.ownerdocument.defaultview); // ...
... } widget.prototype = object.create(view.prototype); widget.prototype.postmessage = function postmessage(message) { let { sand
box } = sand
boxes(this); sand
box.postmessage(json.stringify(json.parse(message))); ...
... delete sand
boxes(this).sand
box; }; exports.widget = widget; in addition access to the namespace can be shared with other code by just handing them a namespace accessor function.
Display a Popup - Archive of obsolete content
// the message payload is the contents of the edit
box.
... var textarea = document.getelementbyid("edit-
box"); textarea.addeventlistener('keyup', function onkeyup(event) { if (event.keycode == 13) { // remove the newline.
...self.port.on("show", function onshow() { textarea.focus(); }); finally, the "text-entry.html" file defines the <textarea> element: <html> <head> <style type="text/css" media="all"> textarea { margin: 10px; } body { background-color: gray; } </style> </head> <body> <textarea rows="13" cols="33" id="edit-
box"></textarea> </body> </html> finally, save these three icon files to the "data" directory: icon-16.png icon-32.png icon-64.png try it out: "index.js" is saved in the top level, and the other five files go in your add-on's data directory: my-addon/ data/ get-text.js icon-16.png icon-32.png icon-64.png ...
Dialogs and Prompts - Archive of obsolete content
this page has some code snippets used to display and process dialog
boxes.
... example: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <dialog xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" ondialogaccept="alert('ok!');"> <h
box> <label value="hey!"/> <spacer flex="1"/> <v
box> <button dlgtype="accept"/> <button dlgtype="cancel"/> </v
box> </h
box> </dialog> default button since firefox 1.5, there are defaultbutton attributes and properties on the <dialog> element bug 284776.
...r/gatekeeper/there.is.only.xul" id="mydialogid" title="my dialog" ondialogaccept="return onok();" onload="onload();" persist="screenx screeny width height" windowtype="mydialogwindowtype"> <script type="application/javascript" src="chrome://myext/content/mydialog.js"/> <grid> <columns><column/><column/></columns> <rows> <row align="center"><label value="name:"/><text
box id="name"/></row> <row align="center"><label value="description:"/><text
box id="description"/></row> <row align="center"><spacer/><check
box id="enabled" label="check to enable"/></row> </rows> </grid> </dialog> mydialog.js: // called once when the dialog displays function onload() { // use the arguments passed to us by the caller document.getelementbyid("name").value = wi...
Extension Etiquette - Archive of obsolete content
about dialogs there is a default popup about dialog that is created from install.rdf data; creating a new xul about
box is usually unnecessary.
... you can decrease download size by omitting a customized about
box.
...scripts can be loaded into their own globals, such as commonjs modules, javascript modules, or sand
boxes, to avoid most global variable and prototype conflicts.
Inline options - Archive of obsolete content
here is an example of an options.xul file: <?xml version="1.0"?> <!doctype mydialog system "chrome://myaddon/locale/mydialog.dtd"> <v
box xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <setting type="bool" pref="extensions.myaddon.bool" title="boolean" desc="stored as a boolean preference" /> </v
box> note that it's limited to <setting> tags.
... the root <v
box> just acts as a container, it isn't merged into the main window.
... setting types there are several types of <setting>s, each with a different type attribute: type attribute displayed as preference stored as bool check
box boolean boolint check
box integer (use the attributes on and off to specify what values to store) integer text
box integer string text
box string color colorpicker string (in the #123456 format) file browse button and label string directory browse button and label string menulist menulist dependent on the menu item values radio radio buttons dependent on the radio values control button no pref stored the p...
Install Manifests - Archive of obsolete content
abouturl the chrome:// url of the extension's about dialog
box.
...accepted values are: 1 opens optionsurl in a dialog
box 2 options are displayed inside the add-on manager 3 opens optionsurl in a new tab (if the application supports that), or a dialog
box optionstype defaults to 1 if there is an optionsurl included in install.rdf or 2 if there is no optionsurl and the file options.xul exists in the root of the add-on.
... optionsurl the chrome:// url of the extension's options dialog
box.
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
event listeners can be defined on the given nodes by passing functions rather than strings to on* attributes: var href = "http://www.google.com/"; var text = "google"; var nodes = {}; document.documentelement.appendchild( jsontodom(["xul:h
box", {}, ["div", {}, ["a", { href: href, key: "link", onclick: function (event) { alert(event.target.href); } }, text], ["span", { class: "stuff" }, "stuff"]]], document, nodes)); alert(nodes.link); function addentrytopopup(menupopup, doc, chromewindow) { var newitem = doc.createelement("menuitem"); ...
... type: "menu", label: "test button label", tooltiptext: "test button tooltip", removable: true, key: "mytestbutton123" }, [ "menupopup", { onpopupshowing: function(event) { addentrytopopup(this, document, window); } }, null ] ]; var capturednodes = {}; var tool
box = doc.getelementbyid("navigator-tool
box"); var palette = tool
box.palette; var domfragment = jsontodom(jsontemplatebtn, document, capturednodes); palette.appendchild(domfragment); alert("capturednodes contains any created nodes that have optionally been captured (for later convenient javascript access) by giving them a 'key' attribute; for example: " + capturednodes.mytestbutton123); another ex...
... ['html:input', {type:'text', value:'my field'}], ['html:button', {id:'mybtn'}, 'button text content'] ], ['html:form', {id:'mysecondform'}, ['html:input', {type:'text', value:'my field for second form'}], ['html:div', {}, 'sub div with textcontent and siblings', ['html:br', {}], ['html:input', {type:'check
box', id:'mycheck'}], ['html:label', {for:'mycheck'}, 'here is text of label, click this text will check the
box' ] ] ] ]; document.body.appendchild(jsontodom(json, document, {})); jquery templating for extensions which already use jquery, it is possible to use its builtin dom building functions for templating, though care must...
The Essentials of an Extension - Archive of obsolete content
nu" label="&xulschoolhello.hello.label;" accesskey="&xulschoolhello.hellomenu.accesskey;" insertafter="helpmenu"> <menupopup> <menuitem id="xulschoolhello-hello-menu-item" label="&xulschoolhello.hello.label;" accesskey="&xulschoolhello.helloitem.accesskey;" oncommand="xulschoolchrome.browseroverlay.sayhello(event);" /> </menupopup> </menu> </menubar> <v
box id="appmenusecondarypane"> <menu id="xulschoolhello-hello-menu-2" label="&xulschoolhello.hello.label;" accesskey="&xulschoolhello.hellomenu.accesskey;" insertafter="appmenu_addons"> <menupopup> <menuitem id="xulschoolhello-hello-menu-item-2" label="&xulschoolhello.hello.label;" accesskey="&xulschoolhello.helloitem.accesskey;" oncommand="xulschoolchrome.
...browseroverlay.sayhello(event);" /> </menupopup> </menu> </v
box> this is the code that adds the hello world menu to the browser window.
...we'll look into some of the differences when we cover the xul
box model, and other more advanced topics.
Adding the structure - Archive of obsolete content
.drop(event, contentareadndobserver);"> <statusbarpanel id="component-bar"/> <statusbarpanel id="statusbar-display" label="&statustext.label;" flex="1"/> <statusbarpanel class="statusbarpanel-progress"> <progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/> </statusbarpanel> <statusbarpanel class="statusbarpanel-iconic" id="tinder
box-status" status="none"/> <statusbarpanel class="statusbarpanel-iconic" id="offline-status"/> <statusbarpanel class="statusbarpanel-iconic" id="security-button" onclick="browserpageinfo(null, 'securitytab')"/> </statusbar> the statusbar xul element defines a horizontal status bar where informative messages about an application's state can be displayed.
... the status attribute is not part of the xul definition for the statusbarpanel element, but is used by our extension to store the current tinder
box state.
... we'll update the value of that attribute each time we retrieve tinder
box'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.
Conclusion - Archive of obsolete content
future directions for development of the tutorial and/or coursework: in addition to build status, tinder
box also tells you if the cvs tree is open or closed for check-ins.
... how could you modify the extension to load the tinder
box page when you click on the status icon?
... tinder
box actually keeps track of more than one codebase.
Enabling the behavior - updating the status bar panel - Archive of obsolete content
in order for loadtinder
boxstatus() to have any effect we need to define a matching updatetinder
boxstatus() function.
... function updatetinder
boxstatus() { var icon = document.getelementbyid('tinder
box-status'); if (gxmlhttprequest.responsetext.match("ee0000")) icon.setattribute("status", "busted"); else if (gxmlhttprequest.responsetext.match("ffaa00")) icon.setattribute("status", "testfailed"); else if (gxmlhttprequest.responsetext.match("11dd11")) icon.setattribute("status", "success"); else icon.setattribute("status", ""); } updatetinder
boxstatus() retrieves a reference to the statusbarpanel element then searches through the retrieved html document (stored in the responsetext property of the xmlhttprequest instance) for one of several color references.
... the color red (represented by the rgb code ee0000) means a tinder
box client failed to build mozilla.
Making it into a dynamic overlay and packaging it up for distribution - Archive of obsolete content
heet href="chrome://tinderstatus/content/tinderstatus.css" type="text/css"?> <overlay id="tinderstatusoverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://tinderstatus/content/tinderstatus.js" /> <statusbar id="status-bar"> <statusbarpanel class="statusbarpanel-iconic" id="tinder
box-status" insertbefore="offline-status" status="none"/> </statusbar> </overlay> we also need to change the urls in the copy of tinderstatus.css: statusbarpanel#tinder
box-status { list-style-image: url("chrome://tinderstatus/content/tb-nostatus.png"); } statusbarpanel#tinder
box-status[status="success"] { list-style-image: url("chrome://tinderstatus/content/tb-success.png...
..."); } statusbarpanel#tinder
box-status[status="testfailed"] { list-style-image: url("chrome://tinderstatus/content/tb-testfailed.png"); } statusbarpanel#tinder
box-status[status="busted"] { list-style-image: url("chrome://tinderstatus/content/tb-busted.png"); } then we need to create two files in the directory, one called contents.rdf which contains information for the chrome registry about the component being installed and one called install.js that contains the code to install the component.
...ttp://www.mozilla.org/rdf/chrome#"> <rdf:seq about="urn:mozilla:package:root"> <rdf:li resource="urn:mozilla:package:tinderstatus"/> </rdf:seq> <rdf:description about="urn:mozilla:package:tinderstatus" chrome:displayname="mozilla tinderstatus extension" chrome:author="myk melez" chrome:name="tinderstatus" chrome:extension="true" chrome:description="displays tinder
box status for the mozilla codebase."> </rdf:description> <rdf:seq about="urn:mozilla:overlays"> <rdf:li resource="chrome://navigator/content/navigator.xul"/> </rdf:seq> <rdf:seq about="chrome://navigator/content/navigator.xul"> <rdf:li>chrome://tinderstatus/content/tinderstatusoverlay.xul</rdf:li> </rdf:seq> </rdf:rdf> install.js, on the other hand, goes into the tinderstatus-installer dire...
Making it into a static overlay - Archive of obsolete content
now that we have a working mozilla extension that shows tinder
box status, we need to make it distributable to other users.
...stylesheet href="chrome://navigator/content/tinderstatus.css" type="text/css"?> <overlay id="tinderstatusoverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="application/javascript" src="chrome://navigator/content/tinderstatus.js" /> <statusbar id="status-bar"> <statusbarpanel class="statusbarpanel-iconic" id="tinder
box-status" insertbefore="offline-status" status="none"/> </statusbar> </overlay> tinderstatusoverlay.xul starts with an xml processing instruction that identifies the file as xml (all xul files need to include this).
...ent, contentareadndobserver);"> <statusbarpanel id="component-bar"/> <statusbarpanel id="statusbar-display" label="&statustext.label;" flex="1"/> <statusbarpanel class="statusbarpanel-progress"> <progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/> </statusbarpanel> <statusbarpanel class="statusbarpanel-iconic" id="tinder
box-status" status="none"/> <statusbarpanel class="statusbarpanel-iconic" id="offline-status"/> <statusbarpanel class="statusbarpanel-iconic" id="security-button" onclick="browserpageinfo(null, 'securitytab')"/> </statusbar> ...
Drag and Drop Example - Archive of obsolete content
it will contain three buttons, one to create new buttons, one to create check
boxes and the other to create text
boxes.
...<v
box> <button label="button" elem="button" ondraggesture="nsdraganddrop.startdrag(event, listobserver)"/> <button label="check
box" elem="check
box" ondraggesture="nsdraganddrop.startdrag(event, listobserver)"/> <button label="text
box" elem="text
box" ondraggesture="nsdraganddrop.startdrag(event, listobserver)"/> </v
box> the nsdraganddrop object will be called to do most of the work.
... <script src="chrome://global/content/nsdraganddrop.js"/> <script src="chrome://global/content/nstransferable.js"/> <script src="dragboard.js"/> <stack id="board" style="width:300px; height: 300px; max-width: 300px; max-height: 300px" ondragover="nsdraganddrop.dragover(event, boardobserver)" ondragdrop="nsdraganddrop.drop(event, boardobserver)"> </stack> <v
box> <button label="button" elem="button" ondraggesture="nsdraganddrop.startdrag(event, listobserver)"/> <button label="check
box" elem="check
box" ondraggesture="nsdraganddrop.startdrag(event, listobserver)"/> <button label="text
box" elem="text
box" ondraggesture="nsdraganddrop.startdrag(event, listobserver)"/> </vb...
Repackaging Firefox - Archive of obsolete content
when repacking firefox 2.0.0.3 or lower, be sure to download the latest version of the repackager, which has an additional check
box in this section to disable the migration wizard at startup.
...check the
boxes next to each one you want to generate.
...the names of the source installer packages for each platform that are included in your source directory will appear next to each check
box.
jspage - Archive of obsolete content
o:function(){return(!window.opera)?false:((arguments.callee.caller)?960:((document.getelementsbyclassname)?950:925)); },trident:function(){return(!window.activexobject)?false:((window.xmlhttprequest)?((document.queryselectorall)?6:5):4);},webkit:function(){return(navigator.taintenabled)?false:((browser.features.xpath)?((browser.features.query)?525:420):419); },gecko:function(){return(!document.get
boxobjectfor&&window.mozinnerscreenx==null)?false:((document.getelementsbyclassname)?19:18);}}},browser||{});browser.platform[browser.platform.name]=true; browser.detect=function(){for(var b in this.engines){var a=this.engines[b]();if(a){this.engine={name:b,version:a};this.engine[b]=this.engine[b+a]=true; break;}}return{name:b,version:a};};browser.detect();browser.request=function(){return $try(funct...
...w.getcomputedstyle(this,null);return(l)?l.getpropertyvalue([m.hyphenate()]):null;},toquerystring:function(){var l=[]; this.getelements("input, select, textarea",true).each(function(m){if(!m.name||m.disabled||m.type=="submit"||m.type=="reset"||m.type=="file"){return;}var n=(m.tagname.tolowercase()=="select")?element.getselected(m).map(function(o){return o.value; }):((m.type=="radio"||m.type=="check
box")&&!m.checked)?null:m.value;$splat(n).each(function(o){if(typeof o!="undefined"){l.push(m.name+"="+encodeuricomponent(o)); }});});return l.join("&");},clone:function(o,l){o=o!==false;var r=this.clonenode(o);var n=function(v,u){if(!l){v.removeattribute("id");}if(browser.engine.trident){v.clearattributes(); v.mergeattributes(u);v.removeattribute("uid");if(v.options){var w=v.options,s=u.options;for(...
...crolltop};},getscrollsize:function(){var i=a(this),h=this.getsize();return{x:math.max(i.scrollwidth,h.x),y:math.max(i.scrollheight,h.y)}; },getposition:function(){return{x:0,y:0};},getcoordinates:function(){var h=this.getsize();return{top:0,left:0,bottom:h.y,right:h.x,height:h.y,width:h.x}; }});var d=element.getcomputedstyle;function e(h,i){return d(h,i).toint()||0;}function f(h){return d(h,"-moz-
box-sizing")=="border-
box";}function g(h){return e(h,"border-top-width"); }function c(h){return e(h,"border-left-width");}function b(h){return(/^(?:body|html)$/i).test(h.tagname);}function a(h){var i=h.getdocument();return(!i.compatmode||i.compatmode=="css1compat")?i.html:i.body; }})();element.alias("setposition","position");native.implement([window,document,element],{getheight:function(){return this...
How to Write and Land Nanojit Patches - Archive of obsolete content
repository: http://hg.mozilla.org/projects/nanojit-central (or clone ssh://hg.mozilla.org/projects/nanojit-central if you want to actually commit changes) tinder
box: http://tinder
box.mozilla.org/showbuilds.cgi?tree=nanojit commit log: http://hg.mozilla.org/projects/nanojit-central/shortlog/ irc channel: irc.mozilla.org #nanojit procedure the first thing to understand is that there are now three copies of nanojit in public mozilla.com repositories: one in nanojit-central, one in tracemonkey, one in tamarin-redux.
... you might find it easier to just cut-and-paste links from the commit log.) you're done, but watch the nanojit tinder
box for breakage.
... you're done, but watch the tinder
box.
Remotely debugging Firefox for Metro - Archive of obsolete content
this can be a security risk, especially if you also set the force-local preference to false.) set up firefox for desktop on the desktop, remote debugging is enabled by a setting in the tool
box.
... open the tool
box, click the "settings" button in the toolbar, and check "enable remote debugging" in the settings tab.
...the tool
box will open in its own window, attached to the firefox for metro tab that's currently hosting mozilla.org: the tool
box, and the tools it hosts (including the console, debugger, style editor, profiler, etc.), work in just the same way as they do when attached to local content.
Binding Attachment and Detachment - Archive of obsolete content
in the following example, a binding is referenced that will be attached to all html check
box elements.
... input[type="check
box"] { -moz-binding: url("http://www.mozilla.org/xbl/htmlbindings.xml#check
box"); } bindings attached through css will only remain on the bound element as long as the element continues to match the style rule.
... var check
box = document.getelementbyid("mycheck
box"); check
box.style.mozbinding = "url(http://www.mozilla.org/xbl/htmlbindings.xml#check
box)"; this attachment is not necessarily synchronous.
Methods - Archive of obsolete content
alert displays an alert dialog
box with a message and an ok button.
... confirm displays a confirm dialog
box with the specified message and ok and cancel buttons.
... also allows custom button labels and a check
box.
eventnode - Archive of obsolete content
if this attribute is not specified, events are listened to from the tab
box.
... thus, if this attribute is not used, the tab
box or an element inside it must have the focus for the keyboard navigation to apply.
... parent keyboard navigation is captured at the parent of the tab
box.
oninput - Archive of obsolete content
« xul reference home oninput type: script code this event is sent when a user enters text in a text
box.
... example <!-- this sets the label's text to the text
box value on each keystroke.
... --> <script language="javascript"> function setlabel(txt
box){ document.getelementbyid('lbl').value = txt
box.value; } </script> <label id="lbl"/> <text
box oninput="setlabel(this);"/> this is similar to the onkeypress event used in html documents.
timeout - Archive of obsolete content
« xul reference home timeout type: integer for autocomplete text
boxes, the number of milliseconds before the text
box starts searching for completions.
...for search text
boxes, the number of milliseconds before the timer fires a command event.
...for timed text
boxes, the number of milliseconds before the timer fires a command event.
userAction - Archive of obsolete content
possible values: none the user is not interacting with the text
box.
... typing the user is typing into the text
box.
... scrolling the user is scrolling through the text
box.
width - Archive of obsolete content
in this example, the preferred width of the inner h
box will be displayed at 40 pixels.
... <h
box> <h
box width="40" style="background-color: red;"> <label value="40"/> </h
box> </h
box> however, in the following example, despite that the preferred width of the
box is 30 pixels, the displayed size of the
box will be larger to accommodate the larger label.
... <v
box width="30" align="start" style="background-color: red;"> <label value="v
box xul width 10px red"/> </v
box> note: when used on treecol objects, the width attribute can be used to allow a tree to be scrolled horizontally if the column widths add up to be wider than the containing object.
findbar - Archive of obsolete content
matchcaseaccesskey type: string the access key for the "match case" check
box in the findbar.
... properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width browser type: browser element lets you set and get the browser in which the findbar is located.
...uri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata close() return type: no return value closes the notification or findbar and removes it from its enclosing notification
box or findbar.
smoothScroll - Archive of obsolete content
« xul reference smoothscroll type: boolean can be set to enable or disable smooth scrolling for the corresponding arrowscroll
box.
... if not set explicitly, it will fall back to the smoothscroll attribute and then to the toolkit.scroll
box.smoothscroll preference.
... currently, smooth scrolling supports horizontal arrowscroll
boxes only.
Sorting and filtering a custom tree view - Archive of obsolete content
sort.xul <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <!doctype window> <window title="sorting a custom tree view example" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" onload="init()"> <script type="application/javascript" src="sort.js"/> <h
box align="center" id="search-
box"> <label accesskey="f" control="filter">filter</label> <text
box id="filter" oninput="inputfilter(event)" flex="1"/> <button id="clearfilter" oncommand="clearfilter()" label="clear" accesskey="c" disabled="true"/> </h
box> <tree id="tree" flex="1" persist="sortdirection sortresource" sortdirection="ascending" sortresource="description"> <treecols> <treeco...
... break; } } }); } sort(); //restore scroll position if (topvisiblerow) { settopvisiblerow(topvisiblerow); } } //generic custom tree view stuff function treeview(table) { this.rowcount = table.length; this.getcelltext = function(row, col) { return table[row][col.id]; }; this.getcellvalue = function(row, col) { return table[row][col.id]; }; this.settree = function(tree
box) { this.tree
box = tree
box; }; this.iseditable = function(row, col) { return col.editable; }; this.iscontainer = function(row){ return false; }; this.isseparator = function(row){ return false; }; this.issorted = function(){ return false; }; this.getlevel = function(row){ return 0; }; this.getimagesrc = function(row,col){ return null; }; this.getrowproperties = function(row,props){}; ...
...for strings, lowercases them function prepareforcomparison(o) { if (typeof o == "string") { return o.tolowercase(); } return o; } function gettopvisiblerow() { return tree.tree
boxobject.getfirstvisiblerow(); } function settopvisiblerow(topvisiblerow) { return tree.tree
boxobject.scrolltorow(topvisiblerow); } function inputfilter(event) { //do this now rather than doing it at every comparison var value = prepareforcomparison(event.target.value); setfilter(value); document.getelementbyid("clearfilter").disabled = value.length == 0; } function clearfilter() { documen...
Additional Navigation - Archive of obsolete content
<h
box datasources="template-guide-ex2.rdf" ref="http://www.daml.org/2001/09/countries/iso#it"> in this example, three triples will be used.
... <v
box uri="?photo" class="
box-padded"> <image src="?photo"/> <label value="?title"/> <label value="country: ?countrytitle"/> </v
box> a label for the country will be displayed as well.
...some padding has been added around each photo using the '
box-padded' class.
Introduction - Archive of obsolete content
here is an example: <v
box datasources="http://www.xulplanet.com/ds/sample.rdf" querytype="rdf"> this example specifies the datasource 'http://www.xulplanet.com/ds/sample.rdf', using the datasource type rdf as indicated by the querytype attribute'.
...for example: <list
box datasources="http://www.xulplanet.com/ds/sample.xml" querytype="xml"> <template> <listitem label="?name"/> </template> </list
box> this template uses an xml datasource to generate a list
box.
...<v
box datasources="rdf:bookmarks http://www.xulplanet.com/ds/sample.rdf"> in addition, when using the rdf type for chrome xul (such as in extensions), the datasource rdf:local-store is always included in the composite.
Multiple Rule Example - Archive of obsolete content
<v
box 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 s...
...ubject="?photo" predicate="http://purl.org/dc/elements/1.1/description" object="?description"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/date" object="?date"/> </conditions> <action> <h
box uri="?photo" class="
box-padded"> <v
box> <label value="?title"/> <image src="?photo"/> </v
box> <group
box> <caption label="photo details"/> <label value="?description"/> <label value="date: ?date"/> </group
box> </h
box> </action> </rule> <rule> <conditions> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?ph...
...oto" predicate="http://purl.org/dc/elements/1.1/title" object="?phototitle"/> </conditions> <action> <v
box uri="?photo" class="
box-padded"> <label value="?phototitle"/> <image src="?photo"/> </v
box> </action> </rule> </template> </v
box> in this example, the first rule matches only those photos with title, description, and date properties.
Multiple Rules - Archive of obsolete content
a multiple rule template looks like the following: <h
box id="photoslist" datasources="template-guide-photos3.rdf" ref="http://www.xulplanet.com/rdf/myphotos"> <template> <query> <content uri="?start"/> <member container="?start" child="?photo"/> <triple subject="?photo" predicate="http://purl.org/dc/elements/1.1/title" object="?title"/> </query> <rule> <where subject="?title" rel="...
...equals" value="canal"/> <action> <button uri="?photo" image="?photo" label="view" orient="vertical"/> </action> </rule> <rule> <action> <image uri="?photo" src="?photo"/> </action> </rule> </template> </h
box> this template contains a query with two rules.
...ater than 1000 differently beforematch if a value comes before another alphabetically aftermatch if a value comes after another alphabetically startswithmatch if a value starts with a specific string endswithmatch if a value ends with a specific string containsmatch if a value contains a substringto highlight results that contain a search term here is an example using the 'contains' operator: <v
box datasources="people.xml" ref="*" querytype="xml"> <template> <query expr="person"> <assign var="?letters" expr="string-length(@name) - 1"/> </query> <rule> <where subject="?name" rel="contains" value=" "/> <action> <label uri="?" value="?name has two names for a total length of ?letters"/> </action> </rule> </template> </v
box> this example cont...
RDF Query Syntax - Archive of obsolete content
<v
box 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> </v
box> this query has two statements, each specified with a different tag.
...the seed is actually an internal variable set to the container, in this case, the v
box, and the ?start variable is set to the ref later, but that is a minor detail that doesn't make templates more understandable.
Adding HTML Elements - Archive of obsolete content
<html:img src="banner.jpg"/> <html:input type="check
box" value="true"/> <html:table> <html:tr> <html:td> a simple table </html:td> </html:tr> </html:table> these examples will create an image from the file banner.jpg, a check
box and a single-cell table.
...a dialog with a check
box example 2 : source view <html:p> click the
box below to remember this decision.
... <html:p> <html:input id="rtd" type="check
box"/> <html:label for="rtd">remember this decision</html:label> </html:p> </html:p> in this case, one p tag was used to place the text in and another was used to break apart the text into multiple lines.
Adding Style Sheets - Archive of obsolete content
<spacer class="titlespace"/> <group
box orient="horizontal"> <caption label="search criteria"/> <menulist id="searchtype"> <menupopup> <menuitem label="name"/> <menuitem label="size"/> <menuitem label="date modified"/> </menupopup> </menulist> <spacer class="springspace"/> <menulist id="searchmode"> <menupopup> <menuitem label="is"/> ...
...<spacer class="titlespace"/> <h
box> <progressmeter id="progmeter" value="50%" style="display:none;"/> the new xml-stylesheet line is used to import the style sheet.
...
box[orient="horizontal"] matches all
box elements that have an orient attribute that is set to horizontal.
Content Panels - Archive of obsolete content
iframe example example 1 : source view <tool
box> <toolbar id="nav-toolbar"> <toolbarbutton label="back" /> <toolbarbutton label="forward" /> <text
box id="urlfield" /> </toolbar> </tool
box> <iframe id="content-body" src="http://www.mozilla.org/index.html" flex="1" /> the example here has created a very simple interface for a web browser.
... a
box has been created containing two elements: a tool
box and an iframe.
...the tabbrowser element is actually implemened as a tab
box containing a set of browser elements.
More Wizards - Archive of obsolete content
in the following example, the user must enter a secret code into a text
box on the first page of the wizard.
...it is also called whenever a key is pressed in the text
box, to determine whether the next button should be enabled again.
...ss"?> <wizard id="thewizard" title="secret code wizard" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> function checkcode(){ document.getelementbyid('thewizard').canadvance = (document.getelementbyid('secretcode').value == "cabbage"); } </script> <wizardpage onpageshow="checkcode(); return true;"> <label value="enter the secret code:"/> <text
box id="secretcode" onkeyup="checkcode();"/> </wizardpage> <wizardpage> <label value="that is the correct secret code."/> </wizardpage> </wizard> there is also a corresponding canrewind property that you can use to enable or disable the back button.
Skinning XUL Files by Hand - Archive of obsolete content
here is a very short (but complete!) cascading stylesheet that might be referenced and used by a xul file: toolbar.nav-bar { background-image: url("chrome://navigator/skin/navbar-bg.gif"); padding: 0px; padding-bottom: 2px; }
box#navbar { background-color: lightblue; } a:link { color: #fa8072; } this stylesheet exhibits three of the different types of style definitions described above.
... add the following lines to the file: @import url(chrome://global/skin/);
box#b
box { background-color: lightgrey; } button#rd { background-color: red; color: white; } save it in the same directory as your xul file.
... when you reload the xul file you have been working on, the
box element you have used to create the navigation area in the xul file appear as follows: the skinned browser is not much to look at right now -- and you may note that this basic skin has transgressed upon some of the skinning guidelines because it overrides color information, but you can get a sense of what the possibilities are with the combination of the xul structure and the style rules of css.
XPCOM Examples - Archive of obsolete content
we can use this as in the following example: example 1 : source <tool
box> <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> </tool
box> a window menu will be created with a list of all the open wi...
... the example below shows how we might do this: <tool
box> <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> </tool
box> <script> function swi...
..."@mozilla.org/cookiemanager;1"] .getservice(components.interfaces.nsicookiemanager); var iter = cookiemanager.enumerator; while (iter.hasmoreelements()){ var cookie = iter.getnext(); if (cookie instanceof components.interfaces.nsicookie){ if (cookie.host == "www.mozillazine.org") menu.appenditem(cookie.name,cookie.value); } } } </script> <h
box> <menulist id="cookiemenu" onpopupshowing="getcookies();"/> </h
box> the getcookies() function will be called whenever the menu is opened, as indicated by the onpopupshowing attribute on the menulist.
XUL Template Primer - Bindings - Archive of obsolete content
<?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin" type="text/css"?> <window xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" align="vertical"> <v
box datasources="friends.rdf" ref="urn:root"> <template> <rule> <conditions> <content uri="?uri"/> <triple subject="?uri" predicate="http://home.netscape.com/nc-rdf#friends" object="?friends"/> <member container="?friends" child="?friend"/> <triple subject="?friend" predicate="http://home.nets...
... object="?name"/> </conditions> <bindings> <binding subject="?friend" predicate="http://home.netscape.com/nc-rdf#address" object="?addr"/> <binding subject="?addr" predicate="http://home.netscape.com/nc-rdf#street" object="?street"/> </bindings> <action> <h
box uri="?friend"> <label value="?name"/> <label value="?street"/> </h
box> </action> </rule> </template> </v
box> </window> the xul template primer covers the <conditions> and <action> elements, so we won't discuss those here.
... in the content that's built for lumpy's <h
box>, the second <label>'s value attribute (which should contain the value of ?street) is just left blank.
colorpicker - Archive of obsolete content
a change event is fired in different ways for different xul input elements as listed below: onchange type: script code text
box when enter key is pressed radio/check
box when the state is changed select list when the selected item is changed what is accessible the script context at this point can only access the following things: global values/functions i.e.
...> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="findfile-window" title="find files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="text/javascript"> function myfunction(e){ /* do something cool here or just say the below */ alert(e.target.nodename); } </script> <text
box id="find-text" onchange="return myfunction(event);"/> </window> preference type: id connects the element to a corresponding preference.
...you may use onclick when you are working with a plain colorpicker and need the currently selected color for example to display in a <text
box>.
description - Archive of obsolete content
if the
box direction is reversed, the cropping is reversed.
...be aware, however, that some elements, such as text
box will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily ...
...for text
box and user editable menulist elements, the contents, as visible to the user, are read and set using the text
box.value and menulist.value syntax.
dialogheader - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a heading row for a dialog
box.
...if the
box direction is reversed, the cropping is reversed.
... properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
grid - Archive of obsolete content
example <!-- group
box containing a grid.
... the second column is twice as big as the first column --> <group
box> <caption label="details"/> <grid> <columns> <column flex="1"/> <column flex="2"/> </columns> <rows> <row> <label value="user name"/> <text
box id="user"/> </row> <row> <label value="group"/> <menulist> <menupopup> <menuitem label="accounts"/> <menuitem label="sales" selected="true"/> <menuitem label="support"/> </menupopup> </menulist> </row> </rows> </grid> </group
box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, ...
..., insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
listhead - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a header row of a list
box.
... inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
...), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements list
box, listcell, listcol, listcols, listheader, listitem ...
menu - Archive of obsolete content
if the
box direction is reversed, the cropping is reversed.
...be aware, however, that some elements, such as text
box will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily ...
...for text
box and user editable menulist elements, the contents, as visible to the user, are read and set using the text
box.value and menulist.value syntax.
menupopup - Archive of obsolete content
attributes ignorekeys, left, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, position, top properties accessibletype, anchornode, popup
boxobject, position, state, triggernode methods hidepopup, moveto, openpopup, openpopupatscreen, setconsumerollupevent, showpopup, sizeto examples the following example shows how a menupopup may be attached to a menulist.
... popup
boxobject type: nsipopup
boxobject this read-only property holds the nsipopup
boxobject that implements the popup.
... to have a popup appear relative to another element yet still offset by some number of pixels, determine the actual screen position of the element using the
boxobject.screenx and
boxobject.screeny properties of the element, and use those as the x and y arguments offset by the desired values.
menuseparator - Archive of obsolete content
if the
box direction is reversed, the cropping is reversed.
...be aware, however, that some elements, such as text
box will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily ...
...for text
box and user editable menulist elements, the contents, as visible to the user, are read and set using the text
box.value and menulist.value syntax.
prefpane - Archive of obsolete content
</preferences> <check
box label="number one?" preference="pref_one"/> ...
...for example, if you are using a list
box and the user changes the contents of the list
box (such as adding or removing an item) and you want to sync the changes back to a preference, you must write an onsynctopreference handler for your list
box that returns the value to be written to the preference element, and then call the userchangedvalue function every time you edit the list in a way that should cause the preference's value to change...
... (1) an example of a widget that has state changes tracked for it includes the check
box element, whose state is tracked automatically when the "command" event fires.
resizer - Archive of obsolete content
attributes dir, element, type examples resizing a window <window xmlns="http://www.mozilla.org/keymaster/gat...re.is.only.xul" hidechrome="true" windowtype="main" orient="vertical" sizemode="normal" width="400" height="300" persist="screenx screeny width height"> <h
box flex="1"> <v
box width="2" style="background-color: grey;"> <resizer dir="topleft" height="2" style="cursor: nw-resize;"/> <resizer dir="left" flex="1" style="cursor: w-resize;"/> <resizer dir="bottomleft" height="2" style="cursor: sw-resize;"/> </v
box> <v
box flex="1"> <resizer dir="top" height="2" style="background-color: grey; cursor: n-resize;"/> <browser flex="1" id="brows...
...er" type="content-primary"/> <resizer dir="bottom" height="2" style="background-color: grey; cursor: s-resize;"/> </v
box> <v
box width="2" style="background-color: grey; overflow: hidden;"> <resizer dir="topright" height="2" style="cursor: ne-resize;"/> <resizer dir="right" flex="1" style="cursor: e-resize;"/> <resizer dir="bottomright" height="2" style="cursor: se-resize;"/> </v
box> </h
box> </window> resizing an element <stack style="border: 1px solid black;"> <button id="button" label="resizable" left="18" top="18" right="18" bottom="18"/> <resizer dir="topleft" style="background: black; -moz-appearance: none;" element="button" left="0" top="0" width="16" height="16"/> <resizer dir="topright" style="background: black; -moz-appearance: none;" ...
..., insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
richlistitem - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] an individual item in a richlist
box.
...be aware, however, that some elements, such as text
box will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily ...
...for text
box and user editable menulist elements, the contents, as visible to the user, are read and set using the text
box.value and menulist.value syntax.
stack - Archive of obsolete content
examples <stack> <h
box flex="1"> <image src="chrome://xulschoolhello/skin/stack-bg.png" flex="1"left="10"right="10" top="10" bottom="10"/> </h
box> <h
box> <!-- some content here.
... --> </h
box> </stack> in this example, the resulting width of the top-most h
box will be 400px (600px - 200px - 0) : <stack width="600"> <h
box flex="1"> <!-- content --> </h
box> <h
box left="0" right="200" > <!-- some content here.
... --> </h
box> </stack> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden,...
toolbaritem - Archive of obsolete content
the element is used, for example, to hold the location bar's text
box in firefox.
..., insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
...normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, tool
box ...
toolbarseparator - Archive of obsolete content
properties accessibletype examples <tool
box> <toolbar> <toolbarbutton label="button 1"/> <toolbarseparator /> <toolbarbutton label="button 2"/> </toolbar> </tool
box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, obser...
... inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendc...
...lize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarset, toolbarspacer, toolbarspring, tool
box ...
treecell - Archive of obsolete content
attributes editable, label, mode, properties, ref, src, value attributes editable type: boolean allows the contents of individual cells in the column to be changed, especially useful when <treecol type="check
box">.
...be aware, however, that some elements, such as text
box will display the value visually, so in order to merely associate data with an element, you could 1) use another attribute like "value2" or "data-myatt" (as in the html5 draft), as xul does not require validation (less future-proof); 2) use setattributens() to put custom attributes in a non-xul namespace (serializable and future-proof); 3) use setuserdata() (future-proof and clean, but not easily ...
... properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentpos...
Windows and menus in XULRunner - Archive of obsolete content
building on the simple window code, here is what xul menus and toolbars look like: <?xml version="1.0"?> <?xml-stylesheet href="chrome://basicapp/skin/main.css" type="text/css"?> <!doctype window system "chrome://basicapp/locale/main.dtd"> <window id="main" title="&title;" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script src="main.js"/> <tool
box> <menubar id="menubar"> <menu id="file-menu" label="&file;"> <menupopup id="file-popup"> <menuitem label="&file.new;" oncommand="dofilenew();"/> <menuitem label="&file.open;" oncommand="dofileopen();"/> <menuitem label="&file.save;" oncommand="dofilesave();"/> <menuseparator/> <menuitem label="&file.exit;" oncommand="dofileexit()...
... <menuitem label="&edit.undo;" oncommand="doeditundo();"/> <menuitem label="&edit.redo;" oncommand="doeditredo();"/> </menupopup> </menu> </menubar> <toolbar id="main-toolbar"> <toolbarbutton id="open" label="&file.open;" oncommand="dofileopen();"/> <toolbarbutton id="save" label="&file.save;" oncommand="dofilesave();"/> </toolbar> </tool
box> ...
...here’s the css file: /* global skin --------------------------------------------------- */ @import url(chrome://global/skin/); /* toolbar ------------------------------------------------------- */ #open { list-style-image: url(chrome://basicapp/skin/open.png); -moz-
box-orient: vertical; } #save { list-style-image: url(chrome://basicapp/skin/save.png); -moz-
box-orient: vertical; } of course, you need to make sure the png files are included in the application.
2006-10-13 - Archive of obsolete content
summary: mozilla.dev.builds - october 7th to october 13th 2006 cannot build ff 1.5.0.7 on linux x86_64 werner flamme cannot build firefox 1.5.0.7 on his suse linux 10.0 x86_64
box.
...he has disabled xft and has tried looking at related postings by benjamin smedberg gcc-40-workarounds and gcc-and-visibility-one-step-forward-hit-a-brick-wall announcements please help us test the new tinder
box and bonsai server installations paul reed announced that they are setting up a new installation of the tinder
box and bonsai servers onto new, supported hardware.
... new tinder
box installation new bonsai installation if any inconsistencies are found please use bugzilla to let them know discussions there were no discussions this week.
2006-11-03 - Archive of obsolete content
more t
box changes on the way, most hitting on friday on october 30th j.
... paul reed announced that: that he is taking down old tinder
boxes and making a few changes to existing tinder
boxes.
... on october 30th boris zbarsky boris expresses his opinion about paul taking down one of the two build
boxes that produces nightly builds for linux.
Extentsions FAQ - Archive of obsolete content
lementbyid("replaceme"); replaceme.parentnode.replacechild(newnode, replaceme); is it possible to place an image in the window that can be moved to anywhere in the window, and always remain on top of everything else?(similiar to using position:absolute and-index:100000 in html) you can almost do this with a stack: <window ...> <stack flex="1"> <image top="40" left="80"/> <v
box> other content here </v
box> </stack> </window> the only restriction is that your image can't overlap the right or bottom of the window.
... how to get the value of a text
box when a button is clicked?
... asking for help in knowing the data that is typed into text
boxes.
2006-10-20 - Archive of obsolete content
discussions sparky and comet going away on friday preed wants to get rid of sparky and comet (both older desktop class linux
boxes).
... robert kaiser gave some background on the
boxes.
... decommissioning sparky on friday preed wants to get rid of sparky (a linux build
box) and wants to know if there are reasons wy not to do it.
Building a Theme - Archive of obsolete content
select the node finding tool (the arrow-plus-
box in the top-left corner of the dom inspector), and click on any unused space on a toolbar.
...the element itself is of id navigator-tool
box, with no idea.
...search this file for the #navigator-tool
box selector, and add a background: orange; rule to it.
Settings - Archive of obsolete content
show variables filter
box enabling this option adds a "filter variables" search
box to the variables pane, so that you can filter the displayed list of variables.
... automatically black
box minified sources new in firefox 33.
... automatically black
box sources whose url ends with ".min.js".
-ms-scrollbar-arrow-color - Archive of obsolete content
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples the following example shows how to use -ms-scrollbar-arrow-color and -ms-scrollbar-face-color to display a scroll bar with a blue scroll
box and arrows, and a scroll bar with a green scroll
box and arrows.
... div { width: 150px; height: 150px; overflow-y: scroll; border-style: solid; border-width: thin; font-family: sans-serif; float: left; margin-right: 10px; } .bluescroll
box { scrollbar-face-color: blue; scrollbar-arrow-color: blue; } .greenscroll
box { scrollbar-face-color: green; scrollbar-arrow-color: green; } <body> <div class="bluescroll
box"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
... </div> <div class="greenscroll
box"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
since i wanted them to be side by side, it was important to be sure the total width of the element
boxes (including margins) was less than 50%, so the first step was this: div.card {float: left; width: 45%; margin: 1em 2% 0 2%;} by making the content of each card 45% the width of the containing element, and adding 2% margin to both the left and right sides, each card's element
box is 49% as wide as the parent.
...i did it that way because it's a lot less likely to trigger a situation where rounding errors force the two floats to total more than 100% the width of the parent, as could happen if the floats' element
boxes were made to total 50%.
...rather than try to fight it or push the image below the h3's element
box, i let the image mostly overlap the h3, but with a slight offset.
XForms Select Element - Archive of obsolete content
representations the xforms select element can be represented by the following widgets for the specified appearance attribute values: list - default representation (xhtml/xul) check group- used when appearance = 'full' (xhtml/xul) list displaying a list
box is the default representation (xhtml/xul).
... characteristics analogous widgets are <html:select size="5" multiple="true"/> and <xul:list
box seltype="multiple"/> visual grouping by choices element isn't implemented if incremental attribute value is false, the bound node is updated when the select control is blurred (i.e.
... loses focus), otherwise it is updated upon item selection check group the select is represented as group of check
boxes (xhtml/xul).
XForms Select1 Element - Archive of obsolete content
representations the xforms select1 element can be represented by the following widgets for the specified appearance attribute values: combo
box - default representation (xhtml/xul) list
box - used when appearance = 'compact' (xhtml/xul) radio group - used when appearance = 'full' (xhtml/xul) combo
box displaying a combo
box is the default representation (xhtml/xul).
...loses focus), otherwise it is updated upon item selection list
box the select1 is represented as list
box (xhtml/xul).
... characteristics analogous widgets are <html:select size="5"/> and <xul:list
box/> visual grouping by choices element isn't implemented selection="open" attribute isn't supported if incremental attribute value is false, the bound node is updated when the select control is blurred (i.e.
Index - Game development
13 3d collision detection 3d, games, javascript, bounding
boxes, collision detection this article provides an introduction to the different bounding volume techniques used to implement collision detection in 3d environments.
... 14 bounding volume collision detection with three.js 3d, games, javascript, webgl, bounding
boxes, collision detection, three.js this article shows how to implement collision detection between bounding
boxes and spheres using the three.js library.
...we have successfully implemented gamepad controls in our game — try connecting any popular controller like the x
box 360 one and see for yourself how fun it is to avoid the asteroids and shoot the aliens with a gamepad.
Alpha (alpha channel) - MDN Web Docs Glossary: Definitions of Web-related terms
below you see a small
box of that color in the top-left corner and a
box of the same color but with an alpha channel set at 0.5 (50% opacity).
... the two
boxes are drawn on top of a paragraph of text.
... as you can see, the color without an alpha channel completely blocks the background text, while the
box with the alpha channel leaves it visible through the purple background color.
Flex - MDN Web Docs Glossary: Definitions of Web-related terms
the items then participate in flex layout, and all of the properties defined in the css flexible
box layout module may be applied.
... the flex property is a shorthand for the flex
box properties flex-grow, flex-shrink and flex-basis.
... learn more property reference align-content align-items align-self flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap justify-content order further reading css flexible
box layout module level 1 specification css flex
box guide: basic concepts of flex
box css flex
box guide: relationship of flex
box to other layout methods css flex
box guide: aligning items in a flex container css flex
box guide: ordering flex items css flex
box guide: controlling ratios of flex items along the main axis css flex
box guide: mastering wrapping of flex items css flex
box guide: typical use cases of flex
box ...
Fragmentainer - MDN Web Docs Glossary: Definitions of Web-related terms
a fragmentainer is defined in the css fragmentation specification as follows: a
box—such as a page
box, column
box, or region—that contains a portion (or all) of a fragmented flow.
... fragmented contexts are found in css paged media, where the fragmentainer would be the
box which defines a page.
... in multiple-column layout the fragmentainer is the column
box created when columns are defined on a multicol container.
Grid Lines - MDN Web Docs Glossary: Definitions of Web-related terms
* {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 100px); } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> .wrapper { display: grid; grid-template-columns: repeat(3, ...
... * {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 100px); } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> ...
... * {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 100px); } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> ...
Mobile accessibility - Learn web development
if you try to control our simple-
box-drag.html (see example live) example with a keyboard or touch, you'll see the problem.
... this occurs because we are using code such as the following: div.onmousedown = function() { initial
boxx = div.offsetleft; initial
boxy = div.offsettop; movepanel(); } document.onmouseup = stopmove; to enable other forms of control, you need to use different, yet equivalent events — for example, touch events work on touchscreen devices: div.ontouchstart = function(e) { initial
boxx = div.offsetleft; initial
boxy = div.offsettop; positionhandler(e); movepanel(); } panel.ontouchend = stopmove; we've provided a simple example that shows how to use the mouse and touch events together — see multi-control-
box-drag.html (see the example live also).
...such issues can be solved by creating a responsive layout using technologies such as media queries, viewport, and flex
box.
Combinators - Learn web development
body article p in the example below, we are matching only the <p> element which is inside an element with a class of .
box.
...next we will move on to another important part of css — the css
box model.
... previous overview: building blocks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the
box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing your css ...
Type, class, and ID selectors - Learn web development
the grey border is applied when the
box has a class of note
box.
...you'll see that the last <div> doesn't get any styling applied, as it only has the danger class; it needs note
box as well to get anything applied.
... previous overview: building blocks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the
box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing your css ...
CSS selectors - Learn web development
h1 { } it also includes selectors which target a class: .
box { } or, an id: #unique { } attribute selectors this group of selectors gives you different ways to select elements based on the presence of a certain attribute on an element: a[title] { } or even make a selection based on the presence of an attribute with a particular value: a[href="https://example.com"] { } pseudo-classes and pseudo-elements this group of selectors includes pseudo-class...
... selector example learn css tutorial type selector h1 { } type selectors universal selector * { } the universal selector class selector .
box { } class selectors id selector #unique { } id selectors attribute selector a[title] { } attribute selectors pseudo-class selectors p:first-child { } pseudo-classes pseudo-element selectors p::first-line { } pseudo-elements descendant combinator article p descendant combinator child combinator article > p ...
... child combinator adjacent sibling combinator h1 + p adjacent sibling general sibling combinator h1 ~ p general sibling in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the
box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing your css ...
Test your skills: Writing Modes and Logical Properties - Learn web development
task one the
box in the example is displayed with a horizontal writing mode.
... task two in the example below use logical properties to replace width and height in order to maintain the aspect ratio of the
box as it is turned vertically.
... task three use logical versions of the margin, border, and padding properties so that the edges of the
box relate to the text rather than following top, left, bottom and right.
Test your skills: floats - Learn web development
the text should then appear between the two
boxes as in the image below.
...the
box wrapping the float and text is displaying behind the float.
... use the most up to date method available to cause the
box background to extend to below the float as in the image.
Styling links - Learn web development
outline for the text outline (an outline is similar to a border, the only difference being that border takes up space in the
box and an outline doesn't; it just sits over the top of the background).
...let's look at a really simple example that adds an icon to external links (links that lead to other sites.) such an icon usually looks like a little arrow pointing out of a
box — for this example, we'll use this great example from icons8.com.
... <li> elements are normally block by default (see types of css
boxes for a refresher), meaning that they will sit on their own lines.
Learn to style HTML using CSS - Learn web development
css layout at this point we've already looked at css fundamentals, how to style text, and how to style and manipulate the
boxes that your content sits inside.
... now it's time to look at how to place your
boxes in the right place in relation to the viewport, and one another.
... we have covered the necessary prerequisites so we can now dive deep into css layout, looking at different display settings, modern layout tools like flex
box, css grid, and positioning, and some of the legacy techniques you might still want to know about.
Example 2 - Learn web development
<li class="option">strawberry</li> <li class="option">apple</li> </ul> </div> <form> css content .widget select, .no-widget .select { position : absolute; left : -5000em; height : 0; overflow : hidden; } /* --------------- */ /* required styles */ /* --------------- */ .select { position: relative; display : inline-block; } .select.active, .select:focus {
box-shadow: 0 0 3px 1px #227755; outline: none; } .select .optlist { position: absolute; top : 100%; left : 0; } .select .optlist.hidden { max-height: 0; visibility: hidden; } /* ------------ */ /* fancy styles */ /* ------------ */ .select { font-size : 0.625em; /* 10px */ font-family : verdana, arial, sans-serif; -moz-
box-sizing : border-
box;
box-sizing : border-bo...
...x; padding : 0.1em 2.5em 0.2em 0.5em; /* 1px 25px 2px 5px */ width : 10em; /* 100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */
box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : -webkit-linear-gradient(90deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-
box-sizing : border-
box;
box-sizing : borde...
...r-
box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optlist { z-index : 2; list-style: none; margin : 0; padding: 0; background: #f0f0f0; border: .2em solid #000; border-top-width : .1em; border-radius: 0 0 .4em .4em;
box-shadow: 0 .2em .4em rgba(0,0,0,.4); -moz-
box-sizing : border-
box;
box-sizing : border-
box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content window.addeventlistener("load", function () { var form = document.queryselector('form'); form.classlist.remove("no-widget"); form.clas...
Example 3 - Learn web development
<li class="option">strawberry</li> <li class="option">apple</li> </ul> </div> </form> css content .widget select, .no-widget .select { position : absolute; left : -5000em; height : 0; overflow : hidden; } /* --------------- */ /* required styles */ /* --------------- */ .select { position: relative; display : inline-block; } .select.active, .select:focus {
box-shadow: 0 0 3px 1px #227755; outline: none; } .select .optlist { position: absolute; top : 100%; left : 0; } .select .optlist.hidden { max-height: 0; visibility: hidden; } /* ------------ */ /* fancy styles */ /* ------------ */ .select { font-size : 0.625em; /* 10px */ font-family : verdana, arial, sans-serif; -moz-
box-sizing : border-
box;
box-sizing : border-bo...
...x; padding : 0.1em 2.5em 0.2em 0.5em; /* 1px 25px 2px 5px */ width : 10em; /* 100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */
box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : -webkit-linear-gradient(90deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-
box-sizing : border-
box;
box-sizing : borde...
...r-
box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optlist { z-index : 2; list-style: none; margin : 0; padding: 0; background: #f0f0f0; border: .2em solid #000; border-top-width : .1em; border-radius: 0 0 .4em .4em;
box-shadow: 0 .2em .4em rgba(0,0,0,.4); -moz-
box-sizing : border-
box;
box-sizing : border-
box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helpers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback...
Example 4 - Learn web development
<li class="option">strawberry</li> <li class="option">apple</li> </ul> </div> </form> css content .widget select, .no-widget .select { position : absolute; left : -5000em; height : 0; overflow : hidden; } /* --------------- */ /* required styles */ /* --------------- */ .select { position: relative; display : inline-block; } .select.active, .select:focus {
box-shadow: 0 0 3px 1px #227755; outline: none; } .select .optlist { position: absolute; top : 100%; left : 0; } .select .optlist.hidden { max-height: 0; visibility: hidden; } /* ------------ */ /* fancy styles */ /* ------------ */ .select { font-size : 0.625em; /* 10px */ font-family : verdana, arial, sans-serif; -moz-
box-sizing : border-
box;
box-sizing : border-bo...
...x; padding : 0.1em 2.5em 0.2em 0.5em; /* 1px 25px 2px 5px */ width : 10em; /* 100px */ border : 0.2em solid #000; /* 2px */ border-radius : 0.4em; /* 4px */
box-shadow : 0 0.1em 0.2em rgba(0,0,0,.45); /* 0 1px 2px */ background : #f0f0f0; background : -webkit-linear-gradient(90deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); background : linear-gradient(0deg, #e3e3e3, #fcfcfc 50%, #f0f0f0); } .select .value { display : inline-block; width : 100%; overflow : hidden; white-space : nowrap; text-overflow : ellipsis; vertical-align: top; } .select:after { content : "▼"; position: absolute; z-index : 1; height : 100%; width : 2em; /* 20px */ top : 0; right : 0; padding-top : .1em; -moz-
box-sizing : border-
box;
box-sizing : borde...
...r-
box; text-align : center; border-left : .2em solid #000; border-radius: 0 .1em .1em 0; background-color : #000; color : #fff; } .select .optlist { z-index : 2; list-style: none; margin : 0; padding: 0; background: #f0f0f0; border: .2em solid #000; border-top-width : .1em; border-radius: 0 0 .4em .4em;
box-shadow: 0 .2em .4em rgba(0,0,0,.4); -moz-
box-sizing : border-
box;
box-sizing : border-
box; min-width : 100%; max-height: 10em; /* 100px */ overflow-y: auto; overflow-x: hidden; } .select .option { padding: .2em .3em; } .select .highlight { background: #000; color: #ffffff; } javascript content // ------- // // helpers // // ------- // nodelist.prototype.foreach = function (callback) { array.prototype.foreach.call(this, callback...
How to structure a web form - Learn web development
this is useful for controls like text inputs, where you can click the label as well as the input to focus it, but it is especially useful for radio buttons and check
boxes — the hit area of such a control can be very small, so it is useful to make it as easy to activate as possible.
... for example, clicking on the "i like cherry" label text in the example below will toggle the selected state of the taste_cherry check
box: <form> <p> <input type="check
box" id="taste_1" name="taste_cherry" value="cherry"> <label for="taste_1">i like cherry</label> </p> <p> <input type="check
box" id="taste_2" name="taste_banana" value="banana"> <label for="taste_2">i like banana</label> </p> </form> note: you can find this example in check
box-label.html (see it live also).
...lists are recommended for structuring multiple check
boxes or radio buttons.
JavaScript basics - Learn web development
for example, the alert() function makes a pop-up
box appear inside the browser window, but we need to give it a string as an argument to tell the function what message to display.
... function setusername() { let myname = prompt('please enter your name.'); localstorage.setitem('name', myname); myheading.textcontent = 'mozilla is cool, ' + myname; } the setusername() function contains a prompt() function, which displays a dialog
box, similar to alert().
... when you run the example and get the dialog
box that prompts you to enter your user name, try pressing the cancel button.
Video and Audio APIs - Learn web development
first of all, notice the .controls styling: .controls { visibility: hidden; opacity: 0.5; width: 400px; border-radius: 10px; position: absolute; bottom: 20px; left: 50%; margin-left: -200px; background-color: black;
box-shadow: 3px 3px 5px black; transition: 1s all; display: flex; } .player:hover .controls, player:focus .controls { opacity: 1; } we start off with the visibility of the custom controls set to hidden.
... we lay out the buttons inside the control bar using flex
box (display: flex), to make things easier.
...this way, we make sure we can see all the information — one
box is not obscuring another.
Focus management with Vue refs - Learn web development
hit it again, and it'll be on the first check
box.
...the check
box will be replaced with our edit component, but the focus outline will be gone.
...when clicking the "edit" button, it makes sense to move focus to the edit name text
box, and back to the "edit" button when canceling or saving from the edit screen.
Mozilla’s UAAG evaluation report
(p1) c status line and alert
boxes used to convey messages and alerts guideline 2.
...(p1) vg mozilla implements standard keyboard bindings there are a few missing pieces, such as support in xul combo
boxes (menulist) for selecting items by typing alphanumeric keystrokes 7.3 operating environment conventions.
...(p1) vg provides a focus outline
box highlights follow graphical rendering conventions for windows does not highlight selected images we do not have the ability to show a border around the text selection we have the following focus appearance prefs that are not exposed in the ui, but can be manually inserted in the user's prefs.js file: setboolpref("browser.display.use_focus_colors", usefocuscolors); /* true or f...
Debugging JavaScript
go to about:config and set the following two prefs: devtools.chrome.enabled: true devtools.debugger.remote-enabled: true after you restart the browser, you can access the browser debugger through tools > web developer > browser tool
box.
... (note that before firefox 28, this was labeled "browser debugger" and only the debugger was available, not the whole tool
box.) note that you must accept the incoming connection : (you may disable the pop-up above with the devtools.debugger.prompt-connection set to false in about:config.
... this can be a security risk, especially if you also set the devtools.debugger.force-local preference to false.) then, the browser tool
box displays the available tools for debugging.
Experimental features in Firefox
html element: <dialog> the html <dialog> element and its associated dom apis provide support for html-based modal dialog
boxes.
... nightly 78 yes developer edition 78 yes beta 78 yes release 78 no preference name network.preload css display stray control characters in css as hex
boxes this feature renders control characters (unicode category cc) other than tab (u+0009), line feed (u+000a), form feed (u+000c), and carriage return (u+000d) as a hex
box when they are not expected.
... nightly 31 yes developer edition 31 no beta 31 no release 31 no preference name layout.css.get
boxquads.enabled geometryutils method: get
boxquads() the geometryutils method get
boxquads() returns the css
boxes for a node relative to any other node or viewport.
Limitations of chrome scripts
sand
boxes you can create sand
boxes in the chrome or the content process.
... sand
boxes are often used as a safe way to manipulate web content, and if that's your goal, create the sand
box in the content process.
... there is a shim for sand
boxes: if you make a sand
box in the chrome process and give it content principals (by passing a cpow as the first argument to components.utils.sand
box) then we'll actually make it in the content process.
How to Report a Hung Firefox
please check the
box to send the crash report to mozilla start firefox.
...please check the
box to send the crash report to mozilla start firefox.
...please check the
box to send the crash report to mozilla start firefox.
PopupNotifications.jsm
the popupnotifications.jsm javascript code module provides a popup notification
box service.
...if you specify null, the notification will be anchored to the popupnotification object's icon
box.
... this anchorid must point to an element contained inside the popupnotification object's icon
box (for firefox windows, the global popupnotifications object uses the notification-popup-
box element).
Localizing with Koala
check the "mercurial" check
box.
... note that you don't have to edit the location field, it automatically fills in when you check the "mercurial" check
box: "c:\mozilla\l10n\application\firefox\3.6".
...user: type your name and your e-mail address in the form: "firstname lastname <me@example.com>" (be sure to type the wrapping quotes: "") note that you no longer have to edit the location now, it automatically fills in when you check the "mercurial" check
box (e.g.
MathML Accessibility in Mozilla
x plus y enclosed by: a radical x + y radical enclosed x+y __________ begin
box x plus y end
box __________ not supported.
... x plus y enclosed by: a
box x + y
box enclosed x+y __________ begin rounded
box x plus y end rounded
box __________ not supported.
... x plus y enclosed by: a rounded
box x + y rounded
box enclosed x+y __________ begin circle x plus y end circle __________ not supported.
about:memory
if you do not wish to share this information, you can select the "anonymize" check
box before clicking on "measure and save..." or "measure...".
...if you select the "verbose" check
box before measuring, all trees will be shown fully expanded and no artificial nodes will be inserted.
...s ├──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 │ └──0.10 mb (00.36%) ++ (4 tiny) └───0.06 mb (00.21%) ── property-tables some of the tree...
AsyncTestUtils extended framework
configuring message injection local injection let in
boxfolder = configure_message_injection({mode: "local"}); set up message injection to happen locally.
... imap injection, do not bring messages offline let in
boxfolder = configure_message_injection({mode: "imap", offline: false}); use an imap fake-server to inject messages.
... imap injection, do bring messages offline let in
boxfolder = configure_message_injection({mode: "imap", offline: true}); use an imap fake-server to inject messages.
Animating CSS properties - Firefox Developer Tools
there are a number of elements, and we've added a linear-gradient background and a
box-shadow to each element, because they are both relatively expensive effects to paint.
...in the screenshot above we've highlighted a paint operation, and the
box on the right tells us it took 13.11ms.
... you can experiment with this: try removing the
box shadow using the page inspector, and see how that affects paint time.
Responsive Design Mode - Firefox Developer Tools
from the developer tools tool
box: press the responsive design mode button in the tool
box's toolbar: from the keyboard: press ctrl + shift + m (or cmd + opt + m on macos).
...for example: developer tool
box with rdm you can show or hide the developer tools tool
box independently of toggling responsive design mode itself: while responsive design mode is enabled, you can continue browsing as you normally would in the resized content area.
...s 50 kb/s 20 kb/s 500 regular 2g 250 kb/s 50 kb/s 300 good 2g 450 kb/s 150 kb/s 150 regular 3g 750 kb/s 250 kb/s 100 good 3g 1.5 mb/s 750 kb/s 40 regular 4g/lte 4 mb/s 3 mb/s 20 dsl 2 mb/s 1 mb/s 5 wi-fi 30 mb/s 15 mb/s 2 to select a network, click the list
box that's initially labeled "no throttling": ...
Tips - Firefox Developer Tools
debugger skip javascript libraries in debugging sessions via the black
box icon ().
... style editor the black
box icon () in the style sheet pane toggles the visibility of a style sheet.
... check "disable http cache (when tool
box is open)" in the settings to disable the network cache while debugging network issues.
Console messages - Firefox Developer Tools
file opens a file dialog
box so you can save an export of all messages available in the display pane.
... filtering by text to see only messages that contain a specific string, type in the text
box labeled "filter output".
... for example, if you entered the string img into the text
box, you would have a list something like this: a small "x" icon appears at the right end of the text
box when you have entered a string on which to filter the output.
Firefox Developer Tools
visualise many aspects of the page including the
box model, animations, and grid layouts.
... note: the collective term for the ui inside which the devtools all live is the tool
box.
... browser tool
box attach the developer tools to the browser itself.
AudioListener.dopplerFactor - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
AudioListener.forwardX - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
AudioListener.forwardY - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
AudioListener.forwardZ - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
AudioListener.positionX - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
AudioListener.positionY - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
AudioListener.positionZ - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
AudioListener.setOrientation() - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
AudioListener.setPosition() - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
AudioListener.speedOfSound - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
AudioListener.upX - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
AudioListener.upY - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
AudioListener.upZ - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
AudioListener - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
BaseAudioContext.createPanner() - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
CSS Painting API - Web APIs
we create our paintworklet called 'hollowhighlights' using the registerpaint() function: registerpaint('hollowhighlights', class { static get inputproperties() { return ['--
boxcolor']; } static get inputarguments() { return ['*','<length>']; } static get contextoptions() { return {alpha: true}; } paint(ctx, size, props, args) { const x = 0; const y = size.height * 0.3; const blockwidth = size.width * 0.33; const blockheight = size.height * 0.85; const thecolor = props.get( '--
boxcolor' ); const stroketype = args[0].tostring(); const strokewidth =...
.../li> <li>item 11</li> <li>item 12</li> <li>item 13</li> <li>item 14</li> <li>item 15</li> <li>item 16</li> <li>item 17</li> <li>item 18</li> <li>item 19</li> <li>item 20</li> </ul> css.paintworklet.addmodule('https://mdn.github.io/houdini-examples/csspaint/intro/worklets/hilite.js'); then we can use the <image> with the css paint() function: li { --
boxcolor: hsla(55, 90%, 60%, 1.0); background-image: paint(hollowhighlights, stroke, 2px); } li:nth-of-type(3n) { --
boxcolor: hsla(155, 90%, 60%, 1.0); background-image: paint(hollowhighlights, filled, 3px); } li:nth-of-type(3n+1) { --
boxcolor: hsla(255, 90%, 60%, 1.0); background-image: paint(hollowhighlights, stroke, 1px); } we've included a custom property in the selector block ...
...defining a
boxcolor.
Document.createElementNS() - Web APIs
important namespace uris html http://www.w3.org/1999/xhtml svg http://www.w3.org/2000/svg mathml http://www.w3.org/1998/math/mathml xul http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul xbl http://www.mozilla.org/xbl example this creates a new <div> element in the xhtml namespace and appends it to the v
box element.
...ces within a single document: <?xml version="1.0"?> <page xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" xmlns:html="http://www.w3.org/1999/xhtml" title="||working with elements||" onload="init()"> <script type="application/javascript"><![cdata[ let container; let newdiv; let txtnode; function init(){ container = document.getelementbyid("container
box"); newdiv = document.createelementns("http://www.w3.org/1999/xhtml", "div"); txtnode = document.createtextnode("this is text that was constructed dynamically with createelementns and createtextnode then inserted into the document using appendchild."); newdiv.appendchild(txtnode); container.appendchild(newdiv); } ]]></script> <v
box id="container
box" flex="1"> <html:div> the sc...
...ript on this page will add dynamic content below: </html:div> </v
box> </page> the example given above uses inline script which is not recommended in xhtml documents.
Element.scrollHeight - Web APIs
</textarea> </p> <p> <input type="check
box" 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.notice
box.innerhtml = checkreading.read ?
... "thank you." : "please, scroll and read the following text."; } onload = function () { var otoberead = document.getelementbyid("rules"); checkreading.notice
box = document.createelement("span"); document.registration.accept.checked = false; checkreading.notice
box.id = "notice"; otoberead.parentnode.insertbefore(checkreading.notice
box, 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.
HTMLDialogElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/htmldialogelement" target="_top"><rect x="1" y="1" width="170" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="86" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmldialogelement</text></a></svg></div>...
... <!-- simple pop-up dialog
box, containing a form --> <dialog id="favdialog"> <form method="dialog"> <section> <p><label for="favanimal">favorite animal:</label> <select id="favanimal" name="favanimal"> <option></option> <option>brine shrimp</option> <option>red panda</option> <option>spider monkey</option> </select></p> </section> <menu> ...
...vanimal'; function opencheck(dialog) { if(dialog.open) { console.log('dialog open'); } else { console.log('dialog closed'); } } // update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog
box cancelbutton.addeventlistener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> note: you can find this example on github as htmldialogelement-basic (see it live also).
HTMLIFrameElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,2...
... htmliframeelement.sand
box is a domsettabletokenlist that reflects the sand
box html attribute, indicating extra restrictions on the behavior of the nested content.
... the following properties have been added: srcdoc, sand
box, and contentwindow.
HTMLImageElement.srcset - Web APIs
<div class="
box"> <img src="/files/16797/clock-demo-200px.png" alt="clock" srcset="/files/16864/clock-demo-200px.png 1x, /files/16797/clock-demo-400px.png 2x"> </div> css the css simply specifies that the image and its surrounding
box should be 200 pixels square and should have a simple border around it.
... .
box { width: 200px; border: 2px solid rgba(150, 150, 150, 255); padding: 0.5em; word-break: break-all; } .
box img { width: 200px; } javascript the following code is run within a handler for the window's load event.
... let
box = document.queryselector(".
box"); let image =
box.queryselector("img"); let newelem = document.createelement("p"); newelem.innerhtml = `image: <code>${image.currentsrc}</code>`;
box.appendchild(newelem); result in the displayed output below, the selected url will correspond with whether your display results in selecting the 1x or the 2x version of the image.
HTMLImageElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25"...
... htmlimageelement.x read only an integer indicating the horizontal offset of the left border edge of the image's css layout
box relative to the origin of the <html> element's containing block.
... htmlimageelement.y read only the integer vertical offset of the top border edge of the image's css layout
box relative to the origin of the <html> element's containing block.
HTMLSelectElement.selectedOptions - Web APIs
html the html that creates the selection
box and the <option> elements representing each of the food choices looks like this: <label for="foods">what do you want to eat?</label><br> <select id="foods" name="foods" size="7" multiple> <option value="1">burrito</option> <option value="2">cheeseburger</option> <option value="3">double bacon burger supreme</option> <option value="4">pepperoni pizza</option> <option value="5">taco</opt...
... javascript the javascript code that establishes the event handler for the button, as well as the event handler itself, looks like this: let orderbutton = document.getelementbyid("order"); let itemlist = document.getelementbyid("foods"); let output
box = document.getelementbyid("output"); orderbutton.addeventlistener("click", function() { let collection = itemlist.selectedoptions; let output = ""; for (let i=0; i<collection.length; i++) { if (output === "") { output = "your order for the following items has been placed: "; } output += collection[i].label; if (i === (collection.length - 2) && (collection.length < 3...
...)) { output += " and "; } else if (i < (collection.length - 2)) { output += ", "; } else if (i === (collection.length - 2)) { output += ", and "; } } if (output === "") { output = "you didn't order anything!"; } output
box.innerhtml = output; }, false); this script sets up a click event listener on the "order now" button.
HTMLVideoElement.msZoom - Web APIs
set to false the video frame uses letter
box or pillar
box to display video.
... if the native aspect ratio of a video frame, which is defined by the videowidth and videoheight attributes, does not match the aspect ratio of the video tag, which is defined by the width and height attributes, the video is rendered with letter
box or pillar
box format.
... letter
box and pillar
box are the black bars on either the left and right of the video or the top and bottom of the video.
Recommended Drag Types - Web APIs
for example: event.datatransfer.setdata("text/plain", "this is text to drag"); dragging text in text
boxes and selections on web pages is done automatically by the browser, so you do not need to handle it yourself.
... the following example shows how to create an area for receiving dropped files: <list
box ondragenter="return checkdrag(event)" ondragover="return checkdrag(event)" ondrop="dodrop(event)"/> <script> function checkdrag(event) { return event.datatransfer.types.contains("application/x-moz-file"); } function dodrop(event) { var file = event.datatransfer.mozgetdataat("application/x-moz-file", 0); if (file instanceof components.interfaces.nsifile) { event.curre...
...during the drop event, the data associated with the file type is retrieved, and the filename of the file is added to the list
box.
IntersectionObserver - Web APIs
properties intersectionobserver.root read only the element or document whose bounds are used as the bounding
box when testing for intersection.
... intersectionobserver.rootmargin read only an offset rectangle applied to the root's bounding
box when calculating intersections, effectively shrinking or growing the root for calculation purposes.
... intersectionobserver.thresholds read only a list of thresholds, sorted in increasing numeric order, where each threshold is a ratio of intersection area to bounding
box area of an observed target.
LocalFileSystemSync - Web APIs
the localfilesystemsync interface of the file system api gives you access to a sand
boxed file system.
... basic concepts you can request access to a sand
boxed file system by requesting localfilesystemsync object from within a web worker.
...you access a sand
boxed file system by requesting a localfilesystemsync object from within a web worker using this global method, window.requestfilesystemsync().
MouseEvent - Web APIs
<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;" view
box="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/event" 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">event</text></a><polyline points="76,25 86,20 86,...
... example this example demonstrates simulating a click (that is programmatically generating a click event) on a check
box using dom methods.
... html <p><label><input type="check
box" id="check
box"> checked</label> <p><button id="button">click me</button> javascript function simulateclick() { var evt = new mouseevent("click", { bubbles: true, cancelable: true, view: window }); var cb = document.getelementbyid("check
box"); //element to click on var canceled = !cb.dispatchevent(evt); if(canceled) { // a handler called preventdefault alert("canceled"); } else { // none of the handlers called preventdefault alert("not canceled"); } } document.getelementbyid("button").addeventlistener('click', simulateclick); result specifications specification status comment css object model (cssom) view modulethe definition of 'mouseevent' in that specification.
Node - Web APIs
<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;" view
box="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25...
... node.get
boxquads() returns a list of the node's css
boxes relative to another node.
... sample usage the following example prints the textcontent properties of each <span> tag in a <div> element named "
box": <div id="
box"> <span>foo</span> <span>bar</span> <span>baz</span> </div> const
box = document.getelementbyid("
box") eachnode(
box, function(node) { if (null != node.textcontent) { console.log(node.textcontent) } }) the above will result in the following strings printing to the user's console: "\n\t", "foo", "\n\t", "bar", "\n\t", "baz" note: whitespace forms part of a text no...
PannerNode.distanceModel - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
PannerNode.maxDistance - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
PannerNode.panningModel - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
PannerNode.setOrientation() - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
PannerNode.setPosition() - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
PannerNode.setVelocity() - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
PannerNode - Web APIs
to see a complete implementation, check out our panner-node example (view the source code) — this demo transports you to the 2.5d "room of metal", where you can play a track on a boom
box and then walk around the boom
box to see how the sound changes!
...time); listener.forwardz.setvalueattime(-1, audioctx.currenttime); listener.upx.setvalueattime(0, audioctx.currenttime); listener.upy.setvalueattime(1, audioctx.currenttime); listener.upz.setvalueattime(0, audioctx.currenttime); } else { listener.setorientation(0,0,-1,0,1,0); } var source; var play = document.queryselector('.play'); var stop = document.queryselector('.stop'); var boom
box = document.queryselector('.boom-
box'); var listenerdata = document.queryselector('.listener-data'); var pannerdata = document.queryselector('.panner-data'); leftbound = (-xpos) + 50; rightbound = xpos - 50; xiterator = width/150; // listener will always be in the same place for this demo if(listener.positionx) { listener.positionx.setvalueattime(xpos, audioctx.currenttime); listener.posi...
...tiony.setvalueattime(ypos, audioctx.currenttime); listener.positionz.setvalueattime(300, audioctx.currenttime); } else { listener.setposition(xpos,ypos,300); } listenerdata.innerhtml = 'listener data: x ' + xpos + ' y ' + ypos + ' z ' + 300; // panner will move as the boom
box graphic moves around on the screen function positionpanner() { if(panner.positionx) { panner.positionx.setvalueattime(xpos, audioctx.currenttime); panner.positiony.setvalueattime(ypos, audioctx.currenttime); panner.positionz.setvalueattime(zpos, audioctx.currenttime); } else { panner.setposition(xpos,ypos,zpos); } pannerdata.innerhtml = 'panner data: x ' + xpos + ' y ' + ypos + ' z ' + zpos; } note: in terms of working out what position values to apply to the listener and panner, to make t...
ResizeObserver.observe() - Web APIs
currently this only has one possible option that can be set:
box sets which
box model the observer will observe changes to.
... possible values are content-
box (the default), and border-
box.
... examples the following snippet is taken from the resize-observer-text.html (see source) example: const resizeobserver = new resizeobserver(entries => { for (let entry of entries) { if(entry.content
boxsize) { h1elem.style.fontsize = math.max(1.5, entry.content
boxsize.inlinesize/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.content
boxsize.inlinesize/600) + 'rem'; } else { h1elem.style.fontsize = math.max(1.5, entry.contentrect.width/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width/600) + 'rem'; } } }); resizeobserver.observe(divelem); an observe() call with an options object would look like so: resizeobserver.observe(divelem, {
box : 'border-
box' }); specifications ...
SVGPatternElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="2...
...stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgpatternelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface also inherits properties from its parent, svgelement and implements the ones from svgfittoview
box and svgurireference.
... methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svgelement and implements the ones from svgfittoview
box and svgurireference.
SVGSymbolElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25"...
...nt-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgsymbolelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface doesn't implement any specific properties, but inherits properties from its parent interface, svggraphicselement, and implements properties from svgfittoview
box.
... methods this interface doesn't implement any specific methods, but inherits methods from its parent interface, svggraphicselement, and implements methods from svgfittoview
box.
Fundamentals of WebXR - Web APIs
virtual reality in a vr environment, the entire image is digitally created by your app or site, from foreground objects all the way to the background or sky
box.
...because ar is always an immersive experience, in which the scene is the entire world around the user (rather than being enclosed in a
box on a screen), the only ar session mode is immersive-ar.
...webxr doesn't generally care which type of device you're using, and the rendering process is almost exactly the same as for vr, except you don't erase the background or sky
box before rendering each frame.
Example and tutorial: Simple synth keyboard - Web APIs
<div class="container"> <div class="keyboard"></div> </div> the <div> named "container" is the scrollable
box that lets the keyboard be scrolled horiontally if it's too wide for the available space.
...then we establish a
box that will be presented on the left side of the bar and place a label and an <input> element of type "range".
...v> </div> css .container { overflow-x: scroll; overflow-y: hidden; width: 660px; height: 110px; white-space: nowrap; margin: 10px; } .keyboard { width: auto; padding: 0; margin: 0; } .key { cursor: pointer; font: 16px "open sans", "lucida grande", "arial", sans-serif; border: 1px solid black; border-radius: 5px; width: 20px; height: 80px; text-align: center;
box-shadow: 2px 2px darkgray; display: inline-block; position: relative; margin-right: 3px; user-select: none; -moz-user-select: none; -webkit-user-select: none; -ms-user-select: none; } .key div { position: absolute; bottom: 0; text-align: center; width: 100%; pointer-events: none; } .key div sub { font-size: 10px; pointer-events: none; } .key:hover { background-colo...
Window.confirm() - Web APIs
example if (window.confirm("do you really want to leave?")) { window.open("exit.html", "thanks for visiting!"); } produces: notes the following text is shared between this article, dom:window.prompt and dom:window.alert dialog
boxes are modal windows — they prevent the user from accessing the rest of the program's interface until the dialog
box is closed.
... for this reason, you should not overuse any function that creates a dialog
box (or modal window).
... regardless, there are good reasons to avoid using dialog
boxes for confirmation.
Window.devicePixelRatio - Web APIs
let pixelratio
box = document.queryselector(".pixel-ratio"); let mqstring = `(resolution: ${window.devicepixelratio}dppx)`; const updatepixelratio = () => { let pr = window.devicepixelratio; let prstring = (pr * 100).tofixed(0); pixelratio
box.innertext = `${prstring}% (${pr.tofixed(2)})`; } updatepixelratio(); matchmedia(mqstring).addlistener(updatepixelratio); the string mqstring is set up to be the medi...
... the updatepixelratio() function fetches the current value of devicepixelratio, then sets the innertext of the element pixelratio
box to a string which displays the ratio both as a percentage and as a raw decimal value with up to two decimal places.
... html the html creates the
boxes containing the instructions and the pixel-ratio
box that will display the current pixel ratio information.
Window.print() - Web APIs
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetprintchrome full support 1notes full support 1notes notes starting with chrome 46, this method is blocked inside an <iframe> unless its sand
box attribute has the value allow-modals.edge full support 12firefox full support 1ie full support 5opera full support 6notes full support 6notes notes starting with opera 33, t...
...his method is blocked inside an <iframe> unless its sand
box attribute has the value allow-modals.safari full support 1.1webview android full support 1notes full support 1notes notes starting with webview 46, this method is blocked inside an <iframe> unless its sand
box attribute has the value allow-modals.chrome android full support 18notes full support 18notes notes starting with chrome 46, this method is blocked inside an <iframe> unless its sand
box attribute has the value allow-modals.firefox android no support nonotes ...
... no support nonotes notes see bug 1247609.opera android full support 10.1notes full support 10.1notes notes starting with opera 33, this method is blocked inside an <iframe> unless its sand
box attribute has the value allow-modals.safari ios full support 1samsung internet android full support 1.0notes full support 1.0notes notes starting with samsung internet 5.0, this method is blocked inside an <iframe> unless its sand
box attribute has the value allow-modals.legend full support ...
Generating HTML - Web APIs
<xsl:template match="/"> <html> <head> <title> <xsl:value-of select="/myns:article/myns:title"/> </title> <style type="text/css"> .my
box {margin:10px 155px 0 50px; border: 1px dotted #639ace; padding:0 5px 0 5px;} </style> </head> <body> <p class="my
box"> <span class="title"> <xsl:value-of select="/myns:article/myns:title"/> </span> </br> authors: <br /> <xsl:apply-templates select="/myns:article/myns:authors/myns:author"/> </p> <p class="my
box"> ...
....0" xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:myns="http://devedge.netscape.com/2002/de"> <xsl:output method="html" /> <xsl:template match="/"> <html> <head> <title> <xsl:value-of select="/myns:article/myns:title"/> </title> <style type="text/css"> .my
box {margin:10px 155px 0 50px; border: 1px dotted #639ace; padding:0 5px 0 5px;} </style> </head> <body> <p class="my
box"> <span class="title"> <xsl:value-of select="/myns:article/myns:title"/> </span> <br /> authors: <br /> <xsl:apply-templates select="/myns:article/myns:authors/myns:author"/> ...
... </p> <p class="my
box"> <xsl:apply-templates select="//myns:body"/> </p> </body> </html> </xsl:template> <xsl:template match="myns:author"> -- <xsl:value-of select="." /> <xsl:if test="@company"> :: <b> <xsl:value-of select="@company" /> </b> </xsl:if> <br /> </xsl:template> <xsl:template match="myns:body"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> <xsl:template match="@*|node()"> <xsl:copy> <xsl:apply-templates select="@*|node()"/> </xsl:copy> </xsl:template> </xsl:stylesheet> ...
ARIA: switch role - Accessibility
the aria switch role is functionally identical to the check
box role, except that instead of representing "checked" and "unchecked" states, which are fairly generic in meaning, the switch role represents the states "on" and "off." this example creates a widget and assigns the aria switch role to it.
... <button type="button" role="switch" aria-checked="true" id="speakerpower" class="switch"> <span>off</span> <span>on</span> </button> <label for="speakerpower" class="switch">speaker power</label> description the aria switch role is identical to the check
box role, except instead of being "checked" or "unchecked", it is either "on" and "off." like the check
box role, the aria-checked attribute is required.
...unlike a <check
box> or role="check
box", there is no indeterminate or mixed state.
Multipart labels: Using ARIA for labels with embedded fields inside them - Accessibility
“delete history after” is to the left of the text
box, x is the number, for example 21, and the word “days” follows the text
box, forming a sentence that is easy to understand.
... if you’re using a screen reader, have you noticed that, when you go to this setting in firefox, it tells you “delete history after 21 days”?, followed by the announcement that you’re in a text
box, and that it contains the number 21.
... example: shut down computer after minutes <input aria-labelledby="labelshutdown shutdowntime shutdownunit" type="check
box" /> <span id="labelshutdown">shut down computer after</span> <input aria-labelledby="labelshutdown shutdowntime shutdownunit" id="shutdowntime" type="text" value="10" /> <span id="shutdownunit"> minutes</span> a note for jaws 8 users jaws 8.0 has its own logic to find labels, causing it to always override the accessiblename the text
box of an html document gets.
-moz-outline-radius-bottomleft - CSS: Cascading Style Sheets
syntax the value of -moz-outline-radius-bottomleft is either a css <length> or a percentage of the corresponding dimensions of the border
box.
... <percentage> the radius of the circle defining the rounding of the bottom-left corner of the element, specified as the percentages of the bottom and left sides of the border
box.
... formal definition initial value0applies toall elementsinheritednopercentagesrefer to the corresponding dimension of the border
boxcomputed valueas specifiedanimation typea length, percentage or calc(); formal syntax <outline-radius>where <outline-radius> = <length> | <percentage> examples rounding a outline since this is a firefox-only property, this example will not display the desired effect if you are viewing this in a browser other than firefox.
-moz-outline-radius-bottomright - CSS: Cascading Style Sheets
syntax the value of -moz-outline-radius-bottomright is either a css <length> or a percentage of the corresponding dimensions of the border
box.
... <percentage> the radius of the circle defining the rounding of the bottom-right corner of the element, specified as the percentages of the bottom and right sides of the border
box.
... formal definition initial value0applies toall elementsinheritednopercentagesrefer to the corresponding dimension of the border
boxcomputed valueas specifiedanimation typea length, percentage or calc(); formal syntax <outline-radius>where <outline-radius> = <length> | <percentage> examples html <p>look at this paragraph's bottom-right corner.</p> css p { margin: 5px; border: solid cyan; outline: dotted red; -moz-outline-radius-bottomright: 2em; } result the example above will not display the desired effect if you are viewing this in a browser other than firefox.
-moz-outline-radius-topleft - CSS: Cascading Style Sheets
syntax the value of -moz-outline-radius-topleft is either a css <length> or a percentage of the corresponding dimensions of the border
box.
... <percentage> the radius of the circle defining the rounding of the top-left corner of the element, specified as the percentages of the top and left sides of the border
box.
... formal definition initial value0applies toall elementsinheritednopercentagesrefer to the corresponding dimension of the border
boxcomputed valueas specifiedanimation typea length, percentage or calc(); formal syntax <outline-radius>where <outline-radius> = <length> | <percentage> examples the example below will not display the desired effect if you are viewing this in a browser other than firefox.
-moz-outline-radius-topright - CSS: Cascading Style Sheets
syntax the value of -moz-outline-radius-topright is either a css <length> or a percentage of the corresponding dimensions of the border
box.
... <percentage> the radius of the circle defining the rounding of the top-right corner of the element, specified as the percentages of the top and right sides of the border
box.
... formal definition initial value0applies toall elementsinheritednopercentagesrefer to the corresponding dimension of the border
boxcomputed valueas specifiedanimation typea length, percentage or calc(); formal syntax <outline-radius>where <outline-radius> = <length> | <percentage> examples html <p>look at this paragraph's top-right corner.</p> css p { margin: 5px; border: solid cyan; outline: dotted red; -moz-outline-radius-topright: 2em; } result the example above will not display the desired effect if you are viewing this in a browser other than firefox.
-moz-user-focus - CSS: Cascading Style Sheets
initial valuenoneapplies toall elementsinheritednocomputed valueas specifiedanimation typediscrete note: this property doesn't work for xul <xul:text
box> elements, because the text
box itself never takes focus.
... instead, xbl creates an anonymous html <input> element inside the text
box, and that element is what receives focus.
... you can stop the text
box from taking keyboard focus by setting its tab index to -1, and from taking mouse focus by preventing the default action of mousedown events.
::after (:after) - CSS: Cascading Style Sheets
/* add an arrow after links */ a::after { content: "→"; } note: the pseudo-elements generated by ::before and ::after are contained by the element's formatting
box, and thus don't apply to replaced elements such as <img>, or to <br> elements.
... html <span class="ribbon">look at the orange
box after this text.
... </span> css .ribbon { background-color: #5bc8f7; } .ribbon::after { content: "this is a fancy orange
box."; background-color: #ffba10; border-color: black; border-style: dotted; } result tooltips this example uses ::after, in conjunction with the attr() css expression and a data-descr custom data attribute, to create tooltips.
::first-letter (:first-letter) - CSS: Cascading Style Sheets
ng-top, padding-right, padding-bottom, padding-left all border properties: the shorthands border, border-style, border-color, border-width, border-radius, border-image, and the longhands properties the color property the text-decoration, text-shadow, text-transform, letter-spacing, word-spacing (when appropriate), line-height, text-decoration-color, text-decoration-line, text-decoration-style,
box-shadow, float, vertical-align (only if float is none) css properties syntax /* css3 syntax */ ::first-letter /* css2 syntax */ :first-letter examples simple drop cap in this example we will use the ::first-letter pseudo-element to create a simple drop cap effect on the first letter of the paragraph coming right after the <h2>.
...stet clita kasd gubergren, no sea takimata sanctus est.</p> <p>duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat.</p> css p { width: 500px; line-height: 1.5; } h2 + p::first-letter { color: white; background-color: black; border-radius: 2px;
box-shadow: 3px 3px 0 red; font-size: 250%; padding: 6px 3px; margin-right: 6px; float: left; } result effect on special punctuation and non-latin characters this example illustrates the effect of ::first-letter on special punctuation and non-latin characters.
... working draft generalizes allowed properties to typesetting, text decoration, inline layout properties, opacity, and
box-shadow.
:default - CSS: Cascading Style Sheets
what this selector matches is defined in html standard §4.16.3 pseudo-classes — it may match the <button>, <input type="check
box">, <input type="radio">, and <option> elements: a default option element is the first one with the selected attribute, or the first enabled option in dom order.
... <input type="check
box"> and <input type="radio"> match if they have the checked attribute.
...son</legend> <input type="radio" name="season" id="spring"> <label for="spring">spring</label> <input type="radio" name="season" id="summer" checked> <label for="summer">summer</label> <input type="radio" name="season" id="fall"> <label for="fall">fall</label> <input type="radio" name="season" id="winter"> <label for="winter">winter</label> </fieldset> css input:default {
box-shadow: 0 0 2px 1px coral; } input:default + label { color: coral; } result specifications specification status comment html living standardthe definition of ':default' in that specification.
:indeterminate - CSS: Cascading Style Sheets
the :indeterminate css pseudo-class represents any form element whose state is indeterminate, such as check
boxes which have their html indeterminate attribute set to true, radio buttons which are members of a group in which all radio buttons are unchecked, and indeterminate <progress> elements.
... /* selects any <input> whose state is indeterminate */ input:indeterminate { background: lime; } elements targeted by this selector are: <input type="check
box"> elements whose indeterminate property is set to true by javascript <input type="radio"> elements, when all radio buttons with the same name value in the form are unchecked <progress> elements in an indeterminate state syntax :indeterminate examples check
box & radio button this example applies special styles to the labels associated with indeterminate form fields.
... html <div> <input type="check
box" id="check
box"> <label for="check
box">this label starts out lime.</label> </div> <div> <input type="radio" id="radio"> <label for="radio">this label starts out lime.</label> </div> css input:indeterminate + label { background: lime; } javascript var inputs = document.getelementsbytagname("input"); for (var i = 0; i < inputs.length; i++) { inputs[i].indeterminate = true; } progress bar html <progress> css progress { margin: 4px; } progress:indeterminate { opacity: 0.5; background-color: lightgray;
box-shadow: 0 0 2px 1px red; } result specifications specification status comment html living standardthe definition of ':indeterminate' in that specification.
any-pointer - CSS: Cascading Style Sheets
examples this example creates a small check
box for users with at least one fine pointer and a large check
box for users with at least one coarse pointer.
... the big check
box takes precedence because it is declared after the small one.
... html <input id="test" type="check
box" /> <label for="test">look at me!</label> css input[type="check
box"]:checked { background: gray; } @media (any-pointer: fine) { input[type="check
box"] { -moz-appearance: none; -webkit-appearance: none; appearance: none; width: 15px; height: 15px; border: 1px solid blue; } } @media (any-pointer: coarse) { input[type="check
box"] { -moz-appearance: none; -webkit-appearance: none; appearance: none; width: 30px; height: 30px; border: 2px solid red; } } result specifications specification status comment media queries level 4the definition of 'any-pointer' in that specification.
CSS Backgrounds and Borders - CSS: Cascading Style Sheets
(additionally, element
boxes can be decorated with a shadow.) reference css properties background background-attachment background-clip background-color background-image background-origin background-position background-position-x background-position-y background-repeat background-size border border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice bord...
...er-image-source border-image-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width
box-shadow tools using multiple backgrounds explains how to set one or more backgrounds on an element.
...
box-shadow generator this interactive tool lets you visually create shadows behind elements (the
box-shadow property).
Spanning and Balancing Columns - CSS: Cascading Style Sheets
when a spanner is introduced, it breaks the flow of columns and columns restart after the spanner, effectively creating a new set of column
boxes.
... things to watch out for if the spanning element is inside another element which has margins, padding and a border or a background color, it is possible to end up with the top of the
box appearing above the spanner and the rest displaying below, as shown in the next example.
...this means that on the last page the final set of column
boxes will be balanced.
Using feature queries - CSS: Cascading Style Sheets
all browsers that support css grid support gap in css grid, however only firefox supports gap in flex
box.
... if you test for the gap property, because you want to use it in flex
box, you will get a positive response even though it is not implemented.
... let's say we want to create a layout of three
boxes in a row, and ideally we would like to use css grid layout.
CSS Display - CSS: Cascading Style Sheets
css display is a module of css that defines how the css formatting
box tree is generated from the document element tree and defines properties controlling it.
... reference css properties display css data types <display-outside> <display-inside> <display-listitem> <display-
box> <display-internal> <display-legacy> guides css flow layout (display: block, display: inline) block and inline layout in normal flow flow layout and overflow flow layout and writing modes formatting contexts explained in flow and out of flow display: flex basic concepts of flex
box aligning items in a flex container controlling ratios of flex items along the main axis cross-browser flex
box mixins mastering wrapping of flex items ordering flex items relationship of flex
box to other layout methods backwards compatibility of flex
box typical use cases of flex
box display: grid basic concepts of grid layout relationship to other layout me...
...thods line-based placement grid template areas layout using named grid lines auto-placement in grid layout
box alignment in grid layout grids, logical values and writing modes css grid layout and accessibility css grid layout and progressive enhancement realizing common layouts using grids specifications specification status comment css display module level 3the definition of 'display' in that specification.
Introduction to formatting contexts - CSS: Cascading Style Sheets
elements participating in a bfc use the rules outlined by the css
box model, which defines how an element's margins, borders, and padding interact with other blocks in the same context.
... the
box model does not fully apply to items participating in an inline formatting context.
...vertical padding and borders will be applied but may overlap content above and below as, in the inline formatting context, the line
boxes will not be pushed apart by padding and borders.
Consistent list indentation - CSS: Cascading Style Sheets
according to the css
box model, the list items'
boxes must be displayed within the parent element's content area.
...what's key is that the markers are placed outside the "principal
box" of the <li> elements, not the <ul>.
...if it's changed to inside, then the markers are brought inside the <li>'s content, as though they're an inline
box placed at the very beginning of the <li>.
CSS Shapes - CSS: Cascading Style Sheets
the specification defines a number of different ways to define a shape on a floated element, causing wrapping lines to wrap round the shape rather than following the rectangle of the element's
box.
...this changes the length of the wrapping text's line
boxes.
... reference properties shape-image-threshold shape-margin shape-outside data types <basic-shape> guides overview of css shapes shapes from
box values basic shapes shapes from images edit shape paths in css — firefox developer tools external resources a list of css shapes resources css shapes 101 creating non-rectangular layouts with css shapes how to use css shapes in your web design how to get started with css shapes what i learned in one weekend with css shapes css vs.
CSS values and units - CSS: Cascading Style Sheets
left | right | none | inline-start | inline-end such values are used without quotes: .
box { float: left; } css-wide values in addition to the pre-defined keywords that are part of the specification for a property, all css properties accept the css-wide property values initial, inherit, and unset, which explicitly specify defaulting behaviors.
... .
box { background-image: url("images/my-background.png"); } .
box { background-image: url("https://www.exammple.com/images/my-background.png"); } the parameter for url() can be either quoted or unquoted.
... as an example, if you specify the width of a
box as a percentage, it refers to the percentage of the
box's parent's computed width: .
box { width: 50%; } mixing percentages and dimensions some properties accept a dimension that could be either one of two types, for example a <length> or a <percentage>.
Layout mode - CSS: Cascading Style Sheets
a css layout mode, sometimes simply called layout, is an algorithm that determines the position and size of
boxes based on the way they interact with their sibling and ancestor
boxes.
...normal flow includes block layout, designed for laying out
boxes such as paragraphs and inline layout, which lays out inline items such as text.
... flexible
box layout, designed for laying out complex pages that can be resized smoothly.
CSS Tutorials - CSS: Cascading Style Sheets
using multiple backgrounds backgrounds are fundamental for nice styling: css allows you to set several of them on each
box.
... understanding z-index controlling superposition of
boxes is a basic feature that is very quickly needed by web developers.
... css flexible
boxes layouts this new layout allow you to give
boxes flexibility, allowing them to be resized smoothly.
border-top-left-radius - CSS: Cascading Style Sheets
percentages for the horizontal axis refer to the width of the
box, percentages for the vertical axis refer to the height of the
box.
...it also applies to ::first-letter.inheritednopercentagesrefer to the corresponding dimension of the border
boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples live example code an arc of ellipse is used as the border div { border-top-left-radius: 40px 40px; } an arc of ellipse is used as the border div...
... { border-top-left-radius: 40px 20px; } the
box is a square: an arc of circle is used as the border div { border-top-left-radius: 40%; } the
box is not a square: an arc of ellipse is used as the border div { border-top-left-radius: 40%; } the background color is clipped at the border div { border-top-left-radius:40%; border-style: black 3px double; background-color: rgb(250,20,70); background-clip: content-
box; } specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-left-radius' in that specification.
calc() - CSS: Cascading Style Sheets
in this example, the css creates a banner that stretches across the window, with a 40-pixel gap between both sides of the banner and the edges of the window: .banner { position: absolute; left: 40px; width: calc(100% - 80px); border: solid black 1px;
box-shadow: 1px 2px; background-color: yellow; padding: 6px; text-align: center;
box-sizing: border-
box; } <div class="banner">this is a banner!</div> automatically sizing form fields to fit their container another use case for calc() is to help ensure that form fields fit in the available space, without extruding past the edge of their container, while maintaining an appropriate margin...
... let's look at some css: input { padding: 2px; display: block; width: calc(100% - 1em); } #form
box { width: calc(100% / 6); border: 1px solid black; padding: 4px; } here, the form itself is established to use 1/6 of the available window width.
...then, the following html makes use of this css: <form> <div id="form
box"> <label>type something:</label> <input type="text"> </div> </form> nested calc() with css variables you can also use calc() with css variables.
color-adjust - CSS: Cascading Style Sheets
formal definition initial valueeconomyapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete formal syntax economy | exact examples preserving low contrast in this example, a
box is shown which uses a background-image and a translucent linear-gradient() function atop a black background color to have a dark blue gradient behind medium red text.
... for whatever reason, this is the desired appearance in any rendering environment, including on paper, so we also use color-adjust: exact to tell the browser not to make color or style adjustments to the
box when rendering it.
... css .my-
box { background-color: black; background-image: linear-gradient(rgba(0, 0, 180, 0.5), rgba(70, 140, 220, 0.5)); color: #900; width: 15rem; height: 6rem; text-align: center; font: 24px "helvetica", sans-serif; display: flex; align-items: center; justify-content: center; color-adjust: exact; } html <div class="my-
box"> <p>need more contrast!</p> </div> result specifications specification status comment css color adjustment module level 1the definition of 'color-adjust' in that specification.
contain - CSS: Cascading Style Sheets
this property is useful on pages that contain a lot of widgets that are all independent, as it can be used to prevent each widget's internals from having side effects outside of the widget's bounding-
box.
...if the containing
box is offscreen, the browser does not need to paint its contained elements — these must also be offscreen as they are contained completely by that
box.
... and if a descendant overflows the containing element's bounds, then that descendant will be clipped to the containing element's border-
box.
drop-shadow() - CSS: Cascading Style Sheets
note: this function is somewhat similar to the
box-shadow property.
... the
box-shadow property creates a rectangular shadow behind an element's entire
box, while the drop-shadow() filter function creates a shadow that conforms to the shape (alpha channel) of the image itself.
... syntax drop-shadow(offset-x offset-y blur-radius color) the drop-shadow() function accepts a parameter of type <shadow> (defined in the
box-shadow property), with the exception that the inset keyword and spread parameters are not allowed.
flex-basis - CSS: Cascading Style Sheets
it sets the size of the content
box unless otherwise set with
box-sizing.
... note: this value was not present in the initial release of flexible
box layout, and thus some older implementations will not support it.
... flex-basis: min-content; } .flex3:after { content: 'min-content'; } .flex4 { flex-basis: fit-content; } .flex4:after { content: 'fit-content'; } .flex5 { flex-basis: content; } .flex5:after { content: 'content'; } .flex6 { flex-basis: fill; } .flex6:after { content: 'fill'; } results specifications specification status comment css flexible
box layout modulethe definition of 'flex-basis' in that specification.
flex-direction - CSS: Cascading Style Sheets
flex
box & the keyboard navigation disconnect — tink source order matters | adrian roselli mdn understanding wcag, guideline 1.3 explanations understanding success criterion 1.3.2 | w3c understanding wcag 2.0 formal definition initial valuerowapplies toflex containersinheritednocomputed valueas specifiedanimation typediscrete formal syntax row | row-reverse | column | column-reverse examples r...
...eversing flex container columns and rows html <h4>this is a column-reverse</h4> <div id="content"> <div class="
box" style="background-color:red;">a</div> <div class="
box" style="background-color:lightblue;">b</div> <div class="
box" style="background-color:yellow;">c</div> </div> <h4>this is a row-reverse</h4> <div id="content1"> <div class="
box1" style="background-color:red;">a</div> <div class="
box1" style="background-color:lightblue;">b</div> <div class="
box1" style="background-color:yellow;">c</div> </div> css #content { width: 200px; height: 200px; border: 1px solid #c3c3c3; display: flex; flex-direction: column-reverse; } .
box { width: 50px; height: 50px; } #content1 { width: 200px; height: 200px; border: 1px solid #c3c3c3; display: flex; flex-d...
...irection: row-reverse; } .
box1 { width: 50px; height: 50px; } result specifications specification status comment css flexible
box layout modulethe definition of 'flex-direction' in that specification.
flex - CSS: Cascading Style Sheets
lass="item auto">auto</div> <div class="item auto">auto</div> <div class="item none">none</div> </div> <div class="flex-container"> <div class="item initial">initial</div> <div class="item none">none</div> <div class="item none">none</div> </div> <div class="flex-container"> <div class="item four">4</div> <div class="item two">2</div> <div class="item one">1</div> </div> * {
box-sizing: border-
box; } .flex-container { background-color: #f4f7f8; resize: horizontal; overflow: hidden; display: flex; margin: 1em; } .item { margin: 1em; padding: 0.5em; width: 110px; min-width: 0; background-color: #1b5385; color: white; font-family: monospace; font-size: 13px; } .initial { flex: initial; } .auto { flex: auto; } .none { flex: none; } .four...
...| <'flex-basis'> ] examples setting flex: auto html <div id="flex-container"> <div class="flex-item" id="flex">flex
box (click to toggle raw
box)</div> <div class="raw-item" id="raw">raw
box</div> </div> css #flex-container { display: flex; flex-direction: row; } #flex-container > .flex-item { flex: auto; } #flex-container > .raw-item { width: 5rem; } var flex = document.getelementbyid("flex"); var raw = document.getelementbyid("raw"); flex.addeventlistener("click", function() { raw.style.displ...
..."block" : "none"; }); #flex-container { width: 100%; font-family: consolas, arial, sans-serif; } #flex-container > div { border: 1px solid #f00; padding: 1rem; } #flex-container > .raw-item { border: 1px solid #000; } result specifications specification status comment css flexible
box layout modulethe definition of 'flex' in that specification.
font - CSS: Cascading Style Sheets
if font is specified as a system keyword, it must be one of: caption, icon, menu, message-
box, small-caption, status-bar.
... message-
box the system font used in dialog
boxes.
...<'font-family'> ] | caption | icon | menu | message-
box | small-caption | status-barwhere <font-variant-css21> = [ normal | small-caps ] examples setting font properties /* set the font size to 12px and the line height to 14px.
gap (grid-gap) - CSS: Cascading Style Sheets
examples flex layout html <div id="flex
box"> <div></div> <div></div> <div></div> <div></div> <div></div> <div></div> </div> css #flex
box { display: flex; flex-wrap: wrap; width: 300px; gap: 20px 5px; } #flex
box > div { border: 1px solid green; background-color: lime; flex: 1 1 auto; width: 100px; height: 50px; } result grid layout html <div id="grid"> <div></div> <div></div> <div></div> <d...
...iv></div> <div></div> <div></div> <div></div> <div></div> <div></div> </div> css #grid { grid-gap: 20px 5px; } #grid { display: grid; height: 200px; grid-template: repeat(3, 1fr) / repeat(3, 1fr); gap: 20px 5px; } #grid > div { border: 1px solid green; background-color: lime; } result multi-column layout html <p class="content-
box"> this is some multi-column text with a 40px column gap created with the css <code>gap</code> property.
...</p> css .content-
box { column-count: 3; gap: 40px; } result specifications specification status comment css
box alignment module level 3the definition of 'gap' in that specification.
margin-trim - CSS: Cascading Style Sheets
in-flow for in-flow
boxes contained by this
box, block-axis margins adjacent to the
box's edges are truncated to zero.
... all trims the margins of in-flow
boxes and floats whose margins coincide with the container's content edge.
...} specifications specification status css
box model module level 4the definition of 'margin-trim' in that specification.
margin - CSS: Cascading Style Sheets
and right: 3% margin */ /* bottom: -1em margin */ margin: 10px 3px 30px 5px; /* top: 10px margin */ /* right: 3px margin */ /* bottom: 30px margin */ /* left: 5px margin */ margin: 2em auto; /* top and bottom: 2em margin */ /*
box is horizontally centered */ margin: auto; /* top and bottom: 0 margin */ /*
box is horizontally centered */ notes horizontal centering to center something horizontally in modern browsers, you can use display: flex; justify-content: center; .
... however, in older browsers like ie8-9 that do not support flexible
box layout, these are not available.
... specifications specification status comment css basic
box modelthe definition of 'margin' in that specification.
mask-border-outset - CSS: Cascading Style Sheets
the mask-border-outset css property specifies the distance by which an element's mask border is set out from its border
box.
...when it eventually starts to be supported, it will serve to move the mask away from the inner edge of the element's border
box — you can use it to make the mask start from part way across the border, rather than the inside of it.
... mask-border-outset: 1rem; chromium-based browsers support an outdated version of this property — mask-
box-image-outset — with a prefix: -webkit-mask-
box-image-outset: 1rem; note: the mask-border page features a working example (using the out-of-date prefixed border mask properties supported in chromium), so you can get an idea of the effect.
order - CSS: Cascading Style Sheets
flex
box & the keyboard navigation disconnect — tink source order matters | adrian roselli mdn understanding wcag, guideline 1.3 explanations understanding success criterion 1.3.2 | w3c understanding wcag 2.0 formal definition initial value0applies toflex items and absolutely-positioned flex container childreninheritednocomputed valueas specifiedanimation typean integer formal syntax <integer> ...
...the flexible
box layout module automatically creates blocks of equal vertical size and uses as much horizontal space as available.
...er>...</header> <main> <article>article</article> <nav>nav</nav> <aside>aside</aside> </main> <footer>...</footer> css main { display: flex; text-align:center; } main > article { flex:1; order: 2; } main > nav { width: 200px; order: 1; } main > aside { width: 200px; order: 3; } result specifications specification status comment css flexible
box layout modulethe definition of 'order' in that specification.
place-content - CSS: Cascading Style Sheets
the align-content and justify-content properties) in a relevant layout system such as grid or flex
box.
... baseline first baseline last baseline specifies participation in first- or last-baseline alignment: aligns the alignment baseline of the
box’s first or last baseline set with the corresponding baseline in the shared first or last baseline set of all the
boxes in its baseline-sharing group.
...ection: ltr; /* can be changed in the live sample */ place-content: flex-end center; /* can be changed in the live sample */ } div > div { border: 2px solid #8c8c8c; width: 50px; background-color: #a0c8ff; } .small { font-size: 12px; height: 40px; } .large { font-size: 14px; height: 50px; } result specifications specification status comment css
box alignment module level 3the definition of 'place content' in that specification.
<position> - CSS: Cascading Style Sheets
the <position> (or <bg-position>) css data type denotes a two-dimensional coordinate used to set a location relative to an element
box.
... note: the final position described by the <position> value does not need to be inside the element's
box.
...each keyword represents either an edge of the element's
box or the center line between two edges.
scroll-margin-inline-end - CSS: Cascading Style Sheets
the scroll-margin-inline-end property defines the margin of the scroll snap area at the end of the inline dimension that is used for snapping this
box to the snapport.
... the scroll snap area is determined by taking the transformed border
box, finding its rectangular bounding
box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets.
...the outer container is styled like this: .scroller { text-align: left; width: 250px; height: 250px; overflow-x: scroll; display: flex;
box-sizing: border-
box; border: 1px solid #000; scroll-snap-type: x mandatory; } the main parts relevant to the scroll snapping are overflow-x: scroll, which makes sure the contents will scroll and not be hidden, and scroll-snap-type: x mandatory, which dictates that scroll snapping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point.
scroll-margin-inline-start - CSS: Cascading Style Sheets
the scroll-margin-inline-start property defines the margin of the scroll snap area at the start of the inline dimension that is used for snapping this
box to the snapport.
... the scroll snap area is determined by taking the transformed border
box, finding its rectangular bounding
box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets.
...the outer container is styled like this: .scroller { text-align: left; width: 250px; height: 250px; overflow-x: scroll; display: flex;
box-sizing: border-
box; border: 1px solid #000; scroll-snap-type: x mandatory; } the main parts relevant to the scroll snapping are overflow-x: scroll, which makes sure the contents will scroll and not be hidden, and scroll-snap-type: x mandatory, which dictates that scroll snapping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point.
scroll-margin-inline - CSS: Cascading Style Sheets
description the scroll-margin values represent outsets defining the scroll snap area that is used for snapping this
box to the snapport.
... the scroll snap area is determined by taking the transformed border
box, finding its rectangular bounding
box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets.
...the outer container is styled like this: .scroller { text-align: left; width: 250px; height: 250px; overflow-x: scroll; display: flex;
box-sizing: border-
box; border: 1px solid #000; scroll-snap-type: x mandatory; } the main parts relevant to the scroll snapping are overflow-x: scroll, which makes sure the contents will scroll and not be hidden, and scroll-snap-type: x mandatory, which dictates that scroll snapping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point.
scroll-margin - CSS: Cascading Style Sheets
thus, the scroll-margin values represent outsets defining the scroll snap area that is used for snapping this
box to the snapport.
... the scroll snap area is determined by taking the transformed border
box, finding its rectangular bounding
box (axis-aligned in the scroll container’s coordinate space), then adding the specified outsets.
...the outer container is styled like this: .scroller { text-align: left; width: 250px; height: 250px; overflow-x: scroll; display: flex;
box-sizing: border-
box; border: 1px solid #000; scroll-snap-type: x mandatory; } the main parts relevant to the scroll snapping are overflow-x: scroll, which makes sure the contents will scroll and not be hidden, and scroll-snap-type: x mandatory, which dictates that scroll snapping must occur along the horizontal axis, and the scrolling will always come to rest on a snap point.
text-align-last - CSS: Cascading Style Sheets
left the inline contents are aligned to the left edge of the line
box.
... right the inline contents are aligned to the right edge of the line
box.
... center the inline contents are centered within the line
box.
transform-style - CSS: Cascading Style Sheets
we also provide a check
box allowing you to toggle between this, and transform-style: flat.
... html <section id="example-element"> <div class="face front">1</div> <div class="face back">2</div> <div class="face right">3</div> <div class="face left">4</div> <div class="face top">5</div> <div class="face bottom">6</div> </section> <div class="check
box"> <label for="preserve"><code>preserve-3d</code></label> <input type="check
box" id="preserve" checked> </div> css #example-element { margin: 50px; width: 100px; height: 100px; transform-style: preserve-3d; transform: rotate3d(1, 1, 1, 30deg); } .face { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; position: absolute; backfac...
...ransform: rotatey(90deg) translatez(50px); } .left { background: rgba(0,0,210,.7); transform: rotatey(-90deg) translatez(50px); } .top { background: rgba(210,210,0,.7); transform: rotatex(90deg) translatez(50px); } .bottom { background: rgba(210,0,210,.7); transform: rotatex(-90deg) translatez(50px); } javascript const cube = document.getelementbyid('example-element'); const check
box = document.getelementbyid('preserve'); check
box.addeventlistener('change', () => { if(check
box.checked) { cube.style.transformstyle = 'preserve-3d'; } else { cube.style.transformstyle = 'flat'; } }) result specifications specification status comment css transforms level 2the definition of 'transform-style' in that specification.
translate - CSS: Cascading Style Sheets
formal definition initial valuenoneapplies totransformable elementsinheritednopercentagesrefer to the size of bounding
boxcomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea transformcreates stacking contextyes formal syntax none | <length-percentage> [ <length-percentage> <length>?
... ]?where <length-percentage> = <length> | <percentage> examples html <div> <p class="translate">translation</p> </div> css * {
box-sizing: border-
box; } html { font-family: sans-serif; } div { width: 150px; margin: 0 auto; } p { padding: 10px 5px; border: 3px solid black; border-radius: 20px; width: 150px; font-size: 1.2rem; text-align: center; } .translate { transition: translate 1s; } div:hover .translate { translate: 200px 50px; } result specifications specification status comment css transforms level 2the definition of 'individual transforms' in that specification.
... initial valuenoneapplies totransformable elementsinheritednopercentagesrefer to the size of bounding
boxcomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea transformcreates stacking contextyes ...
visibility - CSS: Cascading Style Sheets
values visible the element
box is visible.
... hidden the element
box is invisible (not drawn), but still affects layout as normal.
...se">1.2</td> <td>1.3</td> </tr> <tr class="collapse"> <td>2.1</td> <td>2.2</td> <td>2.3</td> </tr> <tr> <td>3.1</td> <td>3.2</td> <td>3.3</td> </tr> </table> css .collapse { visibility: collapse; } table { border: 1px solid red; } td { border: 1px solid gray; } specifications specification status comment css flexible
box layout modulethe definition of 'visibility' in that specification.
width - CSS: Cascading Style Sheets
by default, it sets the width of the content area, but if
box-sizing is set to border-
box, it sets the width of the border area.
...lass="maxgreen">the mozilla community produces a lot of great software.</p> min-content p.minblue { background: lightblue; width: -moz-min-content; /* firefox */ width: -webkit-min-content; /* chrome */ width: min-content; } <p class="minblue">the mozilla community produces a lot of great software.</p> specifications specification status comment css
box sizing module level 4the definition of 'width' in that specification.
... editor's draft css
box sizing module level 3the definition of 'width' in that specification.
Getting Started - Developer guides
first we'll add a text
box to our html so the user can enter their name: <label>your name: <input type="text" id="ajaxtext
box" /> </label> <span id="ajaxbutton" style="cursor: pointer; text-decoration: underline"> make a request </span> we'll also add a line to our event handler to get the user's data from the text
box and send it to the makerequest() function along with the url of our server-side script: document...
....getelementbyid("ajaxbutton").onclick = function() { var username = document.getelementbyid("ajaxtext
box").value; makerequest('test.php',username); }; we need to modify makerequest() to accept the user data and pass it along to the server.
...so if our user typed "jane" in the text
box, the server's response would look like this: {"userdata":"jane","computedstring":"hi, jane!"} to use this data within alertcontents(), we can't just alert the responsetext, we have to parse it and alert computedstring, the property we want: function alertcontents() { if (httprequest.readystate === xmlhttprequest.done) { if (httprequest.status === 200) { var response = json.parse(ht...
Setting up adaptive streaming media sources - Developer guides
quests efficiently your server cannot prefetch range requests efficiently the sidx* is large and having to load it first slows down startup a little you want to use the original files for both dash and other forms of delivery (such as microsoft smooth streaming) as a transition strategy you can use the same media files for both live transmission and vod at a later stage *sidx or segmentindex
box is a structure describing a segment by giving its earliest presentation time and other meta-data and can often make up a large portion of the mpd file.
...this uses mp4
box to encode media into mpeg-dash format.
... http live streaming overview mpeg-dash overview and references dynamic adaptive streaming over http dataset mpeg-dash and streaming reference and resources (msdn) dash adaptive streaming for html 5 video dynamic adaptive streaming over http: from content creation to consumption mpeg-dash tools dashencoder mp4
box dash.js wiki dash.js google group akamai dash diagnostic player adaptive streaming examples itec – dynamic adaptive streaming over http mpeg dash media source demo ...
Rich-Text Editing in Mozilla - Developer guides
function doricheditcommand(aname, aarg){ getiframedocument('editorwindow').execcommand(aname,false, aarg); document.getelementbyid('editorwindow').contentwindow.focus() } example: a simple but complete rich text editor <!doctype html> <html> <head> <title>rich text editor</title> <script type="text/javascript"> var odoc, sdeftxt; function initdoc() { odoc = document.getelementbyid("text
box"); sdeftxt = odoc.innerhtml; if (document.compform.switchmode.checked) { setdocmode(true); } } function formatdoc(scmd, svalue) { if (validatemode()) { document.execcommand(scmd, false, svalue); odoc.focus(); } } function validatemode() { if (!document.compform.switchmode.checked) { return true ; } alert("uncheck \"show html\"."); odoc.focus(); return false; } function setdocmode...
...100,menubar=yes,toolbar=no,location=no,scrollbars=yes"); oprntwin.document.open(); oprntwin.document.write("<!doctype html><html><head><title>print<\/title><\/head><body onload=\"print();\">" + odoc.innerhtml + "<\/body><\/html>"); oprntwin.document.close(); } </script> <style type="text/css"> .intlink { cursor: pointer; } img.intlink { border: 0; } #toolbar1 select { font-size:10px; } #text
box { width: 540px; height: 200px; border: 1px #000000 solid; padding: 12px; overflow: scroll; } #text
box #sourcetext { padding: 0; margin: 0; min-width: 498px; min-height: 200px; } #editmode label { cursor: pointer; } </style> </head> <body onload="initdoc();"> <form name="compform" method="post" action="sample.php" onsubmit="if(validatemode()){this.mydoc.value=odoc.innerhtml;retur...
...gif;base64,r0lgodlhfgawaiquad04ktrly2txqf9vj414wzwibxmorpqbmpgjudclfaezxsa0cb/i1+3yitha7prkiphvbups+/fvrvv8/f///////////////////////////////////////////////yh5baeaab8alaaaaaawabyaaawn4ceozgmeakqubgsuspvbsyfjjvds6njlb0khr4akbcmfscgbqaocwjf5gwquvyksfbwze+awibv0ghfog2ewidchjwriqo9e2fx4xd5r+b0ddaenbxbhbhn2dgwdaqfjjyvhcqyrfgoidgiqjawtcqmriwwmfgicnvcaaamoak+blaortluyt7i5uiuhads=" /> </div> <div id="text
box" contenteditable="true"><p>lorem ipsum</p></div> <p id="editmode"><input type="check
box" name="switchmode" id="switch
box" onchange="setdocmode(this.checked);" /> <label for="switch
box">show html</label></p> <p><input type="submit" value="send" /></p> </form> </body> </html> note: if you want to see how to standardize the creation and the insertion of your editor in your page, please see our mo...
Making content editable - Developer guides
s://www.mozilla.org"); user_pref("capability.policy.allowclipboard.clipboard.cutcopy", "allaccess"); user_pref("capability.policy.allowclipboard.clipboard.paste", "allaccess"); example: a simple but complete rich text editor <!doctype html> <html> <head> <title>rich text editor</title> <script type="text/javascript"> var odoc, sdeftxt; function initdoc() { odoc = document.getelementbyid("text
box"); sdeftxt = odoc.innerhtml; if (document.compform.switchmode.checked) { setdocmode(true); } } function formatdoc(scmd, svalue) { if (validatemode()) { document.execcommand(scmd, false, svalue); odoc.focus(); } } function validatemode() { if (!document.compform.switchmode.checked) { return true ; } alert("uncheck \"show html\"."); odoc.focus(); return false; } function setdocmode...
...100,menubar=yes,toolbar=no,location=no,scrollbars=yes"); oprntwin.document.open(); oprntwin.document.write("<!doctype html><html><head><title>print<\/title><\/head><body onload=\"print();\">" + odoc.innerhtml + "<\/body><\/html>"); oprntwin.document.close(); } </script> <style type="text/css"> .intlink { cursor: pointer; } img.intlink { border: 0; } #toolbar1 select { font-size:10px; } #text
box { width: 540px; height: 200px; border: 1px #000000 solid; padding: 12px; overflow: scroll; } #text
box #sourcetext { padding: 0; margin: 0; min-width: 498px; min-height: 200px; } #editmode label { cursor: pointer; } </style> </head> <body onload="initdoc();"> <form name="compform" method="post" action="sample.php" onsubmit="if(validatemode()){this.mydoc.value=odoc.innerhtml;retur...
...gif;base64,r0lgodlhfgawaiquad04ktrly2txqf9vj414wzwibxmorpqbmpgjudclfaezxsa0cb/i1+3yitha7prkiphvbups+/fvrvv8/f///////////////////////////////////////////////yh5baeaab8alaaaaaawabyaaawn4ceozgmeakqubgsuspvbsyfjjvds6njlb0khr4akbcmfscgbqaocwjf5gwquvyksfbwze+awibv0ghfog2ewidchjwriqo9e2fx4xd5r+b0ddaenbxbhbhn2dgwdaqfjjyvhcqyrfgoidgiqjawtcqmriwwmfgicnvcaaamoak+blaortluyt7i5uiuhads=" /> </div> <div id="text
box" contenteditable="true"><p>lorem ipsum</p></div> <p id="editmode"><input type="check
box" name="switchmode" id="switch
box" onchange="setdocmode(this.checked);" /> <label for="switch
box">show html</label></p> <p><input type="submit" value="send" /></p> </form> </body> </html> note: if you want to see how to standardize the creation and the insertion of your editor in your page, please see our mor...
HTML attribute: multiple - HTML: Hypertext Markup Language
most browsers displaying a scrolling list
box for a <select> control with the multiple attribute set versus a single line dropdown when the attribute is ommitted.
... <select multiple name="drawfs" id="drawfs"> <option>grumpy</option> <option>happy</option> <option>sleepy</option> <option>bashful</option> <option>sneezy</option> <option>dopey</option> <option>doc</option> </select> when multiple is specified, most browsers will show a scrolling list
box instead of a single line dropdown.
...the control generally has a different appearance based on the presence of the multiple attribute, with most browsers displaying a scrolling list
box instead of a single line dropdown when the attribute is present.
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
(for example, display: inline behaves as block.) there will be an anonymous
box holding the contents of the <fieldset>, which inherits certain properties from the <fieldset>.
... if the <fieldset> is styled with display: grid or display: inline-grid, then the anonymous
box will be a grid formatting context.
... if the <fieldset> is styled with display: flex or display: inline-flex, then the anonymous
box will be a flex formatting context.
<input type="number"> - HTML: Hypertext Markup Language
it is displayed inside the edit
box when the element's value is "".
... once data is entered into the
box, the placeholder disappears; if the
box is emptied, the placeholder reappears.
...each option's value is the corresponding suggested value for the number entry
box.
<input type="radio"> - HTML: Hypertext Markup Language
note: check
boxes are similar to radio buttons, but with an important distinction: radio buttons are designed for selecting one value out of a set, whereas check
boxes let you turn individual values on and off.
... where multiple controls exist, radio buttons allow one to be selected out of them all, whereas check
boxes allow multiple values to be selected.
...by default, radio buttons (and check
boxes) are styled with the operating system's native styles for those controls.
Content-Security-Policy - HTTP
elements controlled by object-src are perhaps coincidentally considered legacy html elements and are not receiving new standardized features (such as the security attributes sand
box or allow for <iframe>).
... sand
box enables a sand
box for the requested resource similar to the <iframe> sand
box attribute.
... content security policy 1.0 obsolete defines connect-src, default-src, font-src, frame-src, img-src, media-src, object-src, report-uri, sand
box, script-src, and style-src.
Authoring MathML - MathML
for example the following function verifies the mathml support by testing the mspace element (you may replace mspace with mpadded): function hasmathmlsupport() { var div = document.createelement("div"),
box; div.innerhtml = "<math><mspace height='23px' width='77px'/></math>"; document.body.appendchild(div);
box = div.firstchild.firstchild.getboundingclientrect(); document.body.removechild(div); return math.abs(
box.height - 23) <= 1 && math.abs(
box.width - 77) <= 1; } alternatively, the following ua string sniffing will allow to detect the rendering engines with native mathml support (gec...
...moreover, a latex-to-mathml input
box has also been integrated into seamonkey since version 2.28 and into thunderbird since version 31.
... graphical interface input
box texzilla has several interfaces, including a ckeditor plugin used on mdn, an online demo, a firefox add-on or a firefoxos webapp.
Animation performance and frame rate - Web Performance
there are a number of elements, and we've added a linear-gradient background and a
box-shadow to each element, because they are both relatively expensive effects to paint.
...in the screenshot above we've highlighted a paint operation, and the
box on the right tells us it took 13.11ms.
... you can experiment with this: try removing the
box shadow using the page inspector, and see how that affects paint time.
CSS and JavaScript animation performance - Web Performance
now you will be able to see three little purple
boxes at the upper left corner of the firefox window.
... the first
box represents fps.
... try running them both now, comparing the fps for each (the first purple
box.) you should see that the performance of css animations and requestanimationframe() are very close.
SVG Presentation Attributes - SVG: Scalable Vector Graphics
value: see css display; animatable: yes dominant-baseline it defines the baseline used to align the
box’s text and inline-level contents.
... value: <opacity-value>; animatable: yes overflow specifies whether the content of a block-level element is clipped when it overflows the element's
box.
... value: bounding-
box|visiblepainted|visiblefil|visiblestroke|visible |painted|fill|stroke|all|none; animatable: yes shape-rendering hints about what tradeoffs to make as the browser renders <path> element or basic shapes.
clip-path - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has noticeable effects mostly on the following nineteen elements: <a>, <circle>, <clippath>, <ellipse>, <g>, <glyph>, <image>, <line>, <marker>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <svg>, <symbol>, <text>, <use> html,body,svg { height:100% } <svg view
box="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <clippath id="myclip" clippathunits="objectbounding
box"> <circle cx=".5" cy=".5" r=".5" /> </clippath> <!-- top-left: apply a custom defined clipping path --> <rect x="1" y="1" width="8" height="8" stroke="green" clip-path="url(#myclip)" /> <!-- top-right: apply a css basic shape on a fill-
box geometry.
... this is the same as having a custom clipping path with a clippathunits set to objectbounding
box --> <rect x="11" y="1" width="8" height="8" stroke="green" clip-path="circle() fill-
box" /> <!-- bottom-left --> <rect x="1" y="11" width="8" height="8" stroke="green" clip-path="circle() stroke-
box" /> <!-- bottom-right: apply a css basic shape on a view-
box geometry.
... this is the same as having a custom clipping path with a clippathunits set to userspaceonuse --> <rect x="11" y="11" width="8" height="8" stroke="green" clip-path="circle() view-
box" /> </svg> usage notes value <url> | [ <basic-shape> || <geometry-
box> ] | none default value none animatable yes <geometry-
box> an extra information to tell how a <basic-shape> is applied to an element: fill-
box indicates to use the object bounding
box; stroke-
box indicates to use the object bounding
box extended with the stroke; view-
box indicates to use the nearest svg viewport as the reference
box.
end - SVG: Scalable Vector Graphics
examples offset example <svg width="120" height="120" view
box="0 0 120 120" xmlns="http://www.w3.org/2000/svg" version="1.1"> <!-- animated rectangles --> <rect x="10" y="35" height="15" width="0"> <animate attributetype="xml" attributename="width" to="100" begin="0s" end="8s" fill="freeze" /> </rect> <rect x="10" y="60" height="15" width="0"> <animate attributetype="xml" attributename...
...y2="105" stroke="grey" stroke-width=".5" /> <text x="110" y="20" text-anchor="middle">8s</text> <line x1="110" y1="25" x2="110" y2="105" stroke="grey" stroke-width=".5" /> <line x1="10" y1="30" x2="110" y2="30" stroke="grey" stroke-width=".5" /> <line x1="10" y1="105" x2="110" y2="105" stroke="grey" stroke-width=".5" /> </svg> event example <svg width="120" height="120" view
box="0 0 120 120" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- animated rectangle --> <rect x="10" y="35" height="15" width="0"> <animate attributetype="xml" attributename="width" from="0" to="100" begin="0s" end="endbutton.click" dur="8s" repeatcount="indefinite" fill="freeze" /> </r...
...y2="55" stroke="grey" stroke-width=".5" /> <text x="110" y="20" text-anchor="middle">8s</text> <line x1="110" y1="25" x2="110" y2="55" stroke="grey" stroke-width=".5" /> <line x1="10" y1="30" x2="110" y2="30" stroke="grey" stroke-width=".5" /> <line x1="10" y1="55" x2="110" y2="55" stroke="grey" stroke-width=".5" /> </svg> accesskey example <svg width="120" height="120" view
box="0 0 120 120" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- animated rectangles --> <rect x="10" y="35" height="15" width="0"> <animate attributetype="xml" attributename="width" from="0" to="100" begin="0s" end="accesskey(e)" dur="8s" repeatcount="indefinite" fill="freeze" /> </rec...
fill-rule - SVG: Scalable Vector Graphics
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 view
box="-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.
... example html,body,svg { height:100% } <svg view
box="-10 -10 320 120" xmlns="http://www.w3.org/2000/svg"> <!-- effect of nonzero fill rule on crossing path segments --> <polygon fill-rule="nonzero" stroke="red" points="50,0 21,90 98,35 2,35 79,90"/> <!-- effect of nonzero fill rule on a shape inside a shape with the path segment moving in the same direction (both squares drawn clockwise, to the "right") --> <path fill-...
... example html,body,svg { height:100% } <svg view
box="-10 -10 320 120" xmlns="http://www.w3.org/2000/svg"> <!-- effect of evenodd fill rule on crossing path segments --> <polygon fill-rule="evenodd" stroke="red" points="50,0 21,90 98,35 2,35 79,90"/> <!-- effect of evenodd fill rule on on a shape inside a shape with the path segment moving in the same direction (both squares drawn clockwise, to the "right") --> <path fi...
gradientTransform - SVG: Scalable Vector Graphics
the gradienttransform attribute contains the definition of an optional additional transformation from the gradient coordinate system onto the target coordinate system (i.e., userspaceonuse or objectbounding
box).
...this additional transformation matrix is post-multiplied to (i.e., inserted to the right of) any previously defined transformations, including the implicit transformation necessary to convert from object bounding
box units to user space.
... two elements are using this attribute: <lineargradient> and <radialgradient> html, body, svg { height: 100%; } <svg view
box="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <radialgradient id="gradient1" gradientunits="userspaceonuse" cx="100" cy="100" r="100" fx="100" fy="100"> <stop offset="0%" stop-color="darkblue" /> <stop offset="50%" stop-color="skyblue" /> <stop offset="100%" stop-color="darkblue" /> </radialgradient> <radialgradient id="gradient2" gradientunits="userspaceonuse" cx="100" cy="100" r="100" fx="100" fy="100" gradienttransform="skewx(20) translate(-35, 0)"> <stop offset="0%" stop-color="darkblue" /> <stop offset="50%" stop-color="skyblue" /> <stop offset="100%" stop-color="darkblue" /> </radialgradient> <rect x...
points - SVG: Scalable Vector Graphics
two elements are using this attribute: <polyline>, and <polygon> html,body,svg { height:100% } <svg view
box="-10 -10 220 120" xmlns="http://www.w3.org/2000/svg"> <!-- polyline is an open shape --> <polyline stroke="black" fill="none" points="50,0 21,90 98,35 2,35 79,90"/> <!-- polygon is a closed shape --> <polygon stroke="black" fill="none" transform="translate(100,0)" points="50,0 21,90 98,35 2,35 79,90"/> <!-- it is usualy considered best practices to separate a x and y coordinate with a comma and a group of coordinates by ...
... value [ <number>+ ]# default value none animatable yes example html,body,svg { height:100% } <svg view
box="-10 -10 120 120" xmlns="http://www.w3.org/2000/svg"> <!-- polyline is an open shape --> <polyline stroke="black" fill="none" points="50,0 21,90 98,35 2,35 79,90"/> </svg> polygon for <polygon>, points defines a list of points, each representing a vertex of the shape to be drawn.
... value [ <number>+ ]# default value none animatable yes example html,body,svg { height:100% } <svg view
box="-10 -10 120 120" xmlns="http://www.w3.org/2000/svg"> <!-- polygon is an closed shape --> <polygon stroke="black" fill="none" points="50,0 21,90 98,35 2,35 79,90" /> </svg> specifications specification status comment scalable vector graphics (svg) 2the definition of 'points' in that specification.
visibility - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following nineteen elements: <a>, <altglyph>, <audio>, <canvas>, <circle>, <ellipse>, <foreignobject>, <iframe>, <image>, <line>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, <tspan>, <video> html, body, svg { height: 100%; } <svg view
box="0 0 220 120" xmlns="http://www.w3.org/2000/svg"> <rect x="10" y="10" width="200" height="100" stroke="black" stroke-width="5" fill="transparent" /> <g stroke="seagreen" stroke-width="5" fill="skyblue"> <rect x="20" y="20" width="80" height="80" visibility="visible" /> <rect x="120" y="20" width="80" height="80" visibility="hidden"/> </g> </svg> usage notes value...
...it may receive pointer events depending on the pointer-events attribute, may receive focus depending on the tabindex attribute, contributes to bounding
box calculations and clipping paths, and does affect text layout.
... html <button id="nav-toggle-button" > <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" view
box="0 0 24 24" class="button-icon"> <path d="m16.59 8.59l12 13.17 7.41 8.59 6 10l6 6 6-6z" /> <path d="m12 8l-6 6 1.41 1.41l12 10.83l4.59 4.58l18 14z" class="invisible" /> <path d="m0 0h24v24h0z" fill="none" /> </svg> <span> click me </span> </button> css svg { display: inline !important; } span { vertical-align: 50%; } button { line-height: 1em; } .invisible { visibility: hidden; } javascript document.queryselector("button").addeventlistener("click", function (evt) { this.queryselector("svg > path:nth-of-type(1)").classlis...
x - SVG: Scalable Vector Graphics
map>, <fedropshadow>, <feflood>, <fefunca>, <fefuncb>, <fefuncg>, <fefuncr>, <fegaussianblur>, <feimage>, <femerge>, <femergenode>, <femorphology>, <feoffset>, <fepointlight>, <fespecularlighting>, <fespotlight>, <fetile>, <feturbulence>, <filter>, <foreignobject>, <glyphref>, <image>, <mask>, <pattern>, <rect>, <svg>, <text>, <tref>, <tspan>, and <use> html,body,svg { height:100% } <svg view
box="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <rect x="20" y="20" width="60" height="60" /> <rect x="120" y="20" width="60" height="60" /> <rect x="220" y="20" width="60" height="60" /> </svg> altglyph warning: as of svg2 <altglyph> is deprecated and shouldn't be used.
... value list of (<length> | <percentage>) default value 0 animatable yes example html,body,svg { height:100% } <svg view
box="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <!-- horizontal line to materialized the text base line --> <line x1="0" y1="40%" x2="100%" y2="40%" /> <line x1="0" y1="90%" x2="100%" y2="90%" /> <!-- vertical line to materialized the x positioning --> <line x1="25%" y1="0" x2="25%" y2="100%" /> <line x1="50%" y1="0" x2="50%" y2="100%" /> <line x1="75%" y1="0" x2="75%" y2="100%" ...
... value list of (<length> | <percentage>) default value none animatable yes example html,body,svg { height:100% } <svg view
box="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <!-- horizontal line to materialized the text base line --> <line x1="0" y1="40%" x2="100%" y2="40%" /> <line x1="0" y1="90%" x2="100%" y2="90%" /> <!-- vertical line to materialized the x positioning --> <line x1="25%" y1="0" x2="25%" y2="100%" /> <line x1="50%" y1="0" x2="50%" y2="100%" /> <line x1="75%" y1="0" x2="75%" y2="100%" ...
x1 - SVG: Scalable Vector Graphics
two elements are using this attribute: <line>, and <lineargradient> html,body,svg { height:100% } <svg view
box="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="1" x2="5" y1="1" y2="9" stroke="red" /> <line x1="5" x2="5" y1="1" y2="9" stroke="green" /> <line x1="9" x2="5" y1="1" y2="9" stroke="blue" /> </svg> line for <line>, x1 defines the x coordinate of the starting point of the line.
... value <length> | <percentage> default value 0 animatable yes example html,body,svg { height:100% } <svg view
box="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="1" x2="5" y1="1" y2="9" stroke="red" /> <line x1="5" x2="5" y1="1" y2="9" stroke="green" /> <line x1="9" x2="5" y1="1" y2="9" stroke="blue" /> </svg> lineargradient for <lineargradient>, x1 defines the x coordinate of the starting point of the gradient vector used to map the gradient stop values.
... the exact behavior of this attribute is influenced by the gradientunits attributs value <length> | <percentage> default value 0% animatable yes example html,body,svg { height:100% } <svg view
box="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- by default the gradient vector start at the left bounding limit of the shape it is applied to --> <lineargradient x1="0%" id="g0"> <stop offset="0" stop-color="black" /> <stop offset="100%" stop-color="red" /> </lineargradient> <rect x="1" y="1" width="8" height="8" fill="url(#g0)" /> <!-- here the gradient vector start at 80% of the left bounding limit of the shape it is applied to --> <lineargradient x1="80%" id="g1"> <stop offset="0" stop-color="black" ...
x2 - SVG: Scalable Vector Graphics
two elements are using this attribute: <line>, and <lineargradient> html,body,svg { height:100% } <svg view
box="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="5" x2="1" y1="1" y2="9" stroke="red" /> <line x1="5" x2="5" y1="1" y2="9" stroke="green" /> <line x1="5" x2="9" y1="1" y2="9" stroke="blue" /> </svg> line for <line>, x2 defines the x coordinate of the ending point of the line.
... value <length> | <percentage> default value 0 animatable yes example html,body,svg { height:100% } <svg view
box="0 0 10 10" xmlns="http://www.w3.org/2000/svg"> <line x1="5" x2="1" y1="1" y2="9" stroke="red" /> <line x1="5" x2="5" y1="1" y2="9" stroke="green" /> <line x1="5" x2="9" y1="1" y2="9" stroke="blue" /> </svg> lineargradient for <lineargradient>, x2 defines the x coordinate of the ending point of the gradient vector used to map the gradient stop values.
... the exact behavior of this attribute is influenced by the gradientunits attributs value <length> | <percentage> default value 100% animatable yes example html,body,svg { height:100% } <svg view
box="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- by default the gradient vector end at the right bounding limit of the shape it is applied to --> <lineargradient x2="100%" id="g0"> <stop offset="0" stop-color="black" /> <stop offset="100%" stop-color="red" /> </lineargradient> <rect x="1" y="1" width="8" height="8" fill="url(#g0)" /> <!-- here the gradient vector start at 20% of the left bounding limit of the shape it is applied to --> <lineargradient x2="20%" id="g1"> <stop offset="0" stop-color="blac...
y - SVG: Scalable Vector Graphics
map>, <fedropshadow>, <feflood>, <fefunca>, <fefuncb>, <fefuncg>, <fefuncr>, <fegaussianblur>, <feimage>, <femerge>, <femergenode>, <femorphology>, <feoffset>, <fepointlight>, <fespecularlighting>, <fespotlight>, <fetile>, <feturbulence>, <filter>, <foreignobject>, <glyphref>, <image>, <mask>, <pattern>, <rect>, <svg>, <text>, <tref>, <tspan>, and <use> html,body,svg { height:100% } <svg view
box="0 0 100 300" xmlns="http://www.w3.org/2000/svg"> <rect y="20" x="20" width="60" height="60" /> <rect y="120" x="20" width="60" height="60" /> <rect y="220" x="20" width="60" height="60" /> </svg> altglyph warning: as of svg2 <altglyph> is deprecated and shouldn't be used.
... value list of (<length> | <percentage>) default value 0 animatable yes example html,body,svg { height:100% } <svg view
box="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <!-- horizontal line to materialized the text base line --> <line x1="0" y1="40%" x2="100%" y2="40%" /> <line x1="0" y1="60%" x2="100%" y2="60%" /> <line x1="0" y1="80%" x2="100%" y2="80%" /> <!-- vertical line to materialized the x positioning --> <line x1="5%" y1="0" x2="5%" y2="100%" /> <line x1="55%" y1="0" x2="55%" y2="100%" ...
... value list of (<length> | <percentage>) default value none animatable yes example html,body,svg { height:100% } <svg view
box="0 0 200 100" xmlns="http://www.w3.org/2000/svg"> <!-- horizontal line to materialized the text base line --> <line x1="0" y1="40%" x2="100%" y2="40%" /> <line x1="0" y1="60%" x2="100%" y2="60%" /> <line x1="0" y1="80%" x2="100%" y2="80%" /> <!-- vertical line to materialized the x positioning --> <line x1="5%" y1="0" x2="5%" y2="100%" /> <line x1="55%" y1="0" x2="55%" y2="100%" ...
<clipPath> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg view
box="0 0 100 100"> <clippath id="myclip"> <!-- everything outside the circle will be clipped and therefore invisible.
...the bounding
box of a clipped element (meaning, an element which references a <clippath> element via a clip-path property, or a child of the referencing element) must remain the same as if it were not clipped.
... value type: userspaceonuse|objectbounding
box ; 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, ...
<mask> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg view
box="-10 -10 120 120"> <mask id="mymask"> <!-- everything under a white pixel will be visible --> <rect x="0" y="0" width="100" height="100" fill="white" /> <!-- everything under a black pixel will be invisible --> <path d="m10,35 a20,20,0,0,1,50,35 a20,20,0,0,1,90,35 q90,65,50,95 q10,65,10,35 z" fill="black" /> </mask> <polygon points="-10,110 110,110 110,-10" fill="orange" /> <!-- with this mask applied, we "punch" a heart shape hole into the circle --> <circle cx="50" cy="50" r="50" mask="url(#mymask)" /> </svg> attributes height this attribute defines the height...
... value type: userspaceonuse|objectbounding
box ; default value: userspaceonuse; animatable: yes maskunits this attribute defines defines the coordinate system for attributes x, y, width and height on the <mask>.
... value type: userspaceonuse|objectbounding
box ; default value: objectbounding
box; animatable: yes x this attribute defines the x-axis coordinate of the top-left corner of the masking area.
Gradients in SVG - SVG: Scalable Vector Graphics
there are two possible values to use here: userspaceonuse or objectbounding
box.
... objectbounding
box is the default, so that's what has been shown so far.
... there are some other caveats for dealing with gradientunits="objectbounding
box" when the object bounding
box isn't square, but they're fairly complex and will have to wait for someone more in-the-know to explain them.
Tutorials
intermediate level css layout at this point we've already looked at css fundamentals, how to style text, and how to style and manipulate the
boxes that your content sits inside.
... now it's time to look at how to place your
boxes in the right place in relation to the viewport, and one another.
... we have covered the necessary prerequisites so can now dive deep into css layout, looking at different display settings, traditional layout methods involving float and positioning, and new fangled layout tools like flex
box.
Using custom elements - Web Components
autonomous custom elements let's have a look at an example of an autonomous custom element — <popup-info-
box> (see a live example).
...when the icon is focused, it displays the text in a pop up information
box to provide further in-context information.
... for example, take a look at this code from our popup-info-
box-external-stylesheet example (see the source code): // apply external styles to the shadow dom const linkelem = document.createelement('link'); linkelem.setattribute('rel', 'stylesheet'); linkelem.setattribute('href', 'style.css'); // attach the created element to the shadow dom shadow.appendchild(linkelem); note that <link> elements do not block paint of the shadow root, so there may be a flas...
context-menu - Archive of obsolete content
if the menu was invoked in an input text
box or area, this is the selection of that element, otherwise the selection in the contents of the window.
... value the current contents of a input text
box or area if the menu was invoked in one, null otherwise.
Creating annotations - Archive of obsolete content
1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <head> <title>annotation</title> <style type="text/css" media="all"> body { font: 100% arial, helvetica, sans-serif; background-color: #f5f5f5; } textarea { width: 180px; height: 180px; margin: 10px; padding: 0px; } </style> </head> <body> <textarea rows='10' cols='20' id='annotation-
box'> </textarea> </body> </html> save this inside data/editor as annotation-editor.html.
... here's the code: var textarea = document.getelementbyid('annotation-
box'); textarea.onkeyup = function(event) { if (event.keycode == 13) { self.postmessage(textarea.value); textarea.value = ''; } }; self.on('message', function() { var textarea = document.getelementbyid('annotation-
box'); textarea.value = ''; textarea.focus(); }); save this inside data/editor as annotation-editor.js.
Alerts and Notifications - Archive of obsolete content
mage = null; var win = components.classes['@mozilla.org/embedcomp/window-watcher;1'] .getservice(components.interfaces.nsiwindowwatcher) .openwindow(null, 'chrome://global/content/alerts/alert.xul', '_blank', 'chrome,titlebar=no,popup=yes', null); win.arguments = [image, title, msg, false, '']; } using notification
box another way of non-modal notification and further interaction with users is using of xul elements notification
box and notification (implicitly).
... var message = 'another pop-up blocked'; var
box = gbrowser.getnotification
box(); var notification =
box.getnotificationwithvalue('popup-blocked'); if (notification) { notification.label = message; } else { var buttons = [{ label: 'button', accesskey: 'b', popup: 'blockedpopupoptions', callback: null }]; let priority =
box.priority_warning_medium;
box.appendnotification(message, 'popup-blocked', 'chrome://browser/skin/info.png', priority, buttons); } ...
Sidebar - Archive of obsolete content
tsidebarwidth(newwidth) { var mainwindow = window.queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsiwebnavigation) .queryinterface(components.interfaces.nsidocshelltreeitem) .roottreeitem .queryinterface(components.interfaces.nsiinterfacerequestor) .getinterface(components.interfaces.nsidomwindow); mainwindow.document.getelementbyid("sidebar-
box").width=newwidth; } or function setsidebarwidth(newwidth) { window.top.document.getelementbyid("sidebar-
box").width=newwidth; } you can also disable the ability to resize it manually, using the mouse, by hiding the sidebar's splitter element.
...for example, use this in your sidebar's unload event handler: mainwindow.document.getelementbyid("sidebar-splitter").hidden = mainwindow.document.getelementbyid("sidebar-
box").hidden; see also bootstrap demo addon that creates a sidebar with html content: https://gist.github.com/noitidart/8728393 ...
Tree - Archive of obsolete content
expanding/collapsing all tree nodes to expand all tree nodes: var treeview = tree.tree
boxobject.view; for (var i = 0; i < treeview.rowcount; i++) { if (treeview.iscontainer(i) && !treeview.iscontaineropen(i)) treeview.toggleopenstate(i); } to collapse all tree nodes just change the condition: var treeview = tree.tree
boxobject.view; for (var i = 0; i < treeview.rowcount; i++) { if (treeview.iscontainer(i) && treeview.iscontaineropen(i)) treeview.toggleopenstate(i); } getting the text from the selected row assuming the given <tree>: <tree id="my-tree" seltype="single" onselect="ontreeselected()"> use the following javascript: function ontreeselected(){ var tree = document.getelementbyid("my-tree"); var cellindex = 0; var celltext = tre...
...for example, assuming the given <tree>: <tree id="my-tree" onclick="ontreeclicked(event)"> use the following javascript: function ontreeclicked(event){ var tree = document.getelementbyid("my-tree"); var tbo = tree.tree
boxobject; // get the row, col and child element at the point var row = { }, col = { }, child = { }; tbo.getcellat(event.clientx, event.clienty, row, col, child); var celltext = tree.view.getcelltext(row.value, col.value); alert(celltext); } getting the selected indices of a multiselect tree var start = {}, end = {}, numranges = tree.view.selection.getrangecount(), selectedindices = ...
Code snippets - Archive of obsolete content
xml file i/o code used to read, write and process files drag & drop code used to setup and handle drag and drop events dialogs code used to display and process dialog
boxes alerts and notifications modal and non-modal ways to notify users preferences code used to read, write, and modify preferences js xpcom code used to define and call xpcom components in javascript running applications code used to run other applications <canvas> related what wg canvas-related code signing a xpi how to sign an xpi with pki delayed execution performing background op...
... autocomplete code used to enable form autocomplete in a browser
boxes tips and tricks when using
boxes as containers tab
box removing and manipulating tabs in a tab
box windows-specific finding window handles (hwnd) (firefox) how to use windows api calls to find various kinds of mozilla window handles.
How to convert an overlay extension to restartless - Archive of obsolete content
the next is example of the code: var overlay = toolbarbutton(toolbarbuttonattrs, panel({'id': 'thepanel', 'type': 'arrow'}, h
box({'align': 'start'}, v
box( h
box({'class': 'pixel-h
box'}, description({'value': this.stringbundle.getstringfromname('firexpixel.opacity')}), htmlinput({'id': 'opacity-range', 'type': 'range', 'min': '0', 'max': '10'}) ), h
box({'id': 'pixel-coords', 'class': 'pixel-h
box'}, label({'control': 'coord-x', 'value': 'x:'}), ...
... text
box({'id': 'coord-x', 'class': 'coord-
box', 'placeholder' : '0'}), label({'control': 'coord-y', 'value': 'y:'}), text
box({'id': 'coord-y', 'class': 'coord-
box', 'placeholder': '0'}) ...
Jetpack Processes - Archive of obsolete content
createsand
box() this creates a new javascript sand
box and returns its global scope.
...evalinsand
box(asand
box, ascript) evaluates the given script contents in the given sand
box's global scope.
deck - Archive of obsolete content
attributes selectedindex properties selectedindex, selectedpanel examples <deck selectedindex="2"> <description value="this is the first page"/> <button label="this is the second page"/> <
box> <description value="this is the third page"/> <button label="this is also the third page"/> </
box> </deck> attributes selectedindex type: integer gets and sets the index of the currently selected panel.
... inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
elements - Archive of obsolete content
a action arrowscroll
box b b
box binding bindings
box broadcaster broadcasterset button browser c check
box caption colorpicker column columns commandset command conditions content d deck description dialog dialogheader e editor grid grippy group
box h h
box i iframe image k key keyset l label list
box 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 richlist
box richlistitem resizer row rows rule s script scrollbar scroll
box scrollcorn...
...er separator spacer splitter stack statusbar statusbarpanel stringbundle stringbundleset t tab tabbrowser tab
box tabpanel tabpanels tabs template textnode text
box titlebar toolbar toolbarbutton toolbargrippy toolbaritem toolbarpalette toolbarseparator toolbarset toolbarspacer toolbarspring tool
box tooltip tree treecell treechildren treecol treecols treeitem treerow treeseparator triple v v
box w window wizard wizardpage ...
image - Archive of obsolete content
inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
... message-icon class that adds a message
box icon.
menubar - Archive of obsolete content
to look native (at least on windows), the menubar element needs to be placed inside a tool
box element.
... inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
progressmeter - Archive of obsolete content
for text
box and user editable menulist elements, the contents, as visible to the user, are read and set using the text
box.value and menulist.value syntax.
... inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), getelementsbytagnamens(), getfe...
scrollbar - Archive of obsolete content
increment type: integer the amount by which the curpos (for scroll bars) or value (for number
boxes and scale) attribute changes when the arrows are clicked(or scales are dragged).
... properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
scrollcorner - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element is used for the small
box where the horizontal and vertical scrollbars meet.
..., insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
spacer - Archive of obsolete content
examples <
box> <button label="left"/> <spacer flex="1"/> <button label="right"/> </
box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize, flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, mi...
...nwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(...
spinbuttons - Archive of obsolete content
for instance, spinbuttons are used for the number type text
box, and with the timepicker and datepicker.
..., insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
statusbar - Archive of obsolete content
it is virtually equivalent to a standard
box, but may be rendered differently.
... inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendc...
<statusbarpanel> - Archive of obsolete content
if the
box direction is reversed, the cropping is reversed.
... inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
tabpanel - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
...(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements tab
box, tabs, tab, tabpanels.
toolbargrippy - Archive of obsolete content
inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
..., normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, tool
box interfaces nsiaccessibleprovider ...
toolbarpalette - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
...x, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarseparator, toolbarset, toolbarspacer, toolbarspring, tool
box ...
toolbarset - Archive of obsolete content
id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendc...
...ix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarspacer, tool
box ...
toolbarspacer - Archive of obsolete content
inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
..., normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspring, tool
box interfaces nsiaccessibleprovider ...
toolbarspring - Archive of obsolete content
inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendc...
...e(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata related elements toolbar, toolbarbutton, toolbargrippy, toolbaritem, toolbarpalette, toolbarseparator, toolbarset, toolbarspacer, tool
box interfaces nsiaccessibleprovider ...
reftest opportunities files - Archive of obsolete content
udos3 http://dbaron.org/css/test/firstchild http://dbaron.org/css/test/sec051103 http://dbaron.org/css/test/sec051103b http://dbaron.org/css/test/order http://dbaron.org/css/test/inherit http://dbaron.org/css/test/sec060402 http://dbaron.org/css/test/sec060403b http://dbaron.org/css/test/specific http://dbaron.org/css/test/noncss1 http://dbaron.org/css/test/noncss2 http://dbaron.org/css/test/short
box http://dbaron.org/css/test/short
box2 http://dbaron.org/css/test/root
box http://dbaron.org/css/test/list
box http://dbaron.org/css/test/margtest http://dbaron.org/css/test/shortborder http://dbaron.org/css/test/shortborder2 http://dbaron.org/css/test/sec0805 http://dbaron.org/css/test/dborder http://dbaron.org/css/test/sec090102 http://dbaron.org/css/test/sec090201 http://dbaron.org/css/test/sec090...
...http://dbaron.org/css/test/sec100303 http://dbaron.org/css/test/sec100304 http://dbaron.org/css/test/sec100305 http://dbaron.org/css/test/sec100307 http://dbaron.org/css/test/sec1004 http://dbaron.org/css/test/sec1004b http://dbaron.org/css/test/sec100604 http://dbaron.org/css/test/sec1007 http://dbaron.org/css/test/sec1007b http://dbaron.org/css/test/abspos_inherit http://dbaron.org/css/test/line
box1 http://dbaron.org/css/test/line
box2 http://dbaron.org/css/test/line
box3 http://dbaron.org/css/test/line
box4 http://dbaron.org/css/test/inlinetest http://dbaron.org/css/test/sec1101 http://dbaron.org/css/test/sec110102 http://dbaron.org/css/test/sec110102b http://dbaron.org/css/test/sec1102a http://dbaron.org/css/test/sec1102b http://dbaron.org/css/test/sec1201 http://dbaron.org/css/test/sec1202 ...
2006-10-20 - Archive of obsolete content
comet and btek are currently the fastest-cycling tinder
boxes available therefore they are quite fast to detect general fires on the mozilla tree.
...boris zbarsky's said: the reason why gtk1 builds are still being performed is because: when requests are made to change build
boxes to newer versions the people responsible for making the change reply with "that would require an os upgrade".
Monitoring plugins - Archive of obsolete content
here is an example that shows the runtime in an alert
box to the user if the runtime exceeds half a second in length: observe: function(subject, topic, data) { if (topic == "experimental-notify-plugin-call" ) { if (data > 0.500) { alert("runtime is: " + data); } } } note: this is just a simplified example and the use of alert() is discouraged as the component can send hundreds of notifications each second and could poten...
...tially cause your browser to crash if an excessive number of alert
boxes are displayed.
NPN_GetValue - Archive of obsolete content
you can use npnvnetscapewindow to obtain the appropriate window for the wm_transient_for property of a dialog
box created from the plug-in.
... microsoft windows you can use this method to help create a menu or dialog
box for a windowless plug-in.
Theme changes in Firefox 3 - Archive of obsolete content
changes in browser --- changes in global all platforms the yellow background for the location bar has been deprecated; instead, themes should style the new #identity-
box element depending on its verifieddomain/verifiedidentity class.
... 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.
-ms-hyphenate-limit-zone - Archive of obsolete content
initial value0applies toblock container elementsinheritedyespercentagescalculated with respect to the width of the line
boxcomputed valueas specifiedanimation typediscrete syntax values <percentage> an integer followed by a percent sign (%), which specifies the width of the hyphenation zone, calculated with respect to the line
box.
...the hyphenation zone is always at the logical right side of the padding
box.
-ms-scrollbar-3dlight-color - Archive of obsolete content
the -ms-scrollbar-3dlight-color css property is a microsoft extension specifying the color of the top and left edges of the scroll
box and scroll arrows of a scroll bar.
... initial valuedepends on user agentapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the top and left edges of the scroll
box and scroll arrows of the scroll bar.
-ms-scrollbar-highlight-color - Archive of obsolete content
the -ms-scrollbar-highlight-color css property is a microsoft extension that specifies the color of the slider tray, the top and left edges of the scroll
box, and the scroll arrows of a scroll bar.
... initial valuethreedhighlightapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the slider tray, the top and left edges of the scroll
box, and the scroll arrows of a scroll bar.
-ms-scrollbar-shadow-color - Archive of obsolete content
the -ms-scrollbar-shadow-color css property is a microsoft extension that specifies the color of the bottom and right edges of the scroll
box and scroll arrows of a scroll bar.
... initial valuethreeddarkshadowapplies toall elementsinheritedyescomputed valueas specifiedanimation typediscrete syntax values <color> the color of the bottom and right edges of the scroll
box and scroll arrows of a scroll bar.
-ms-wrap-flow - Archive of obsolete content
clear inline flow content can only wrap on top and bottom of the exclusion and must leave empty the areas to the start and end edges of the exclusion
box.
...in that case, the element contributes its border
box to its containing block's wrapping context and content flows around it according to the clear property.
-ms-wrap-through - Archive of obsolete content
the wrapping context of a
box is a collection of exclusion areas contributed by its associated exclusion
boxes.
... the inline flow content of a
box is placed in the area that corresponds to the subtraction of its wrapping context from its own content area.
Processing XML with E4X - Archive of obsolete content
// alerts "agile" alert(languages.tostring()); /* alerts: <languages type="agile"><lang>javascript</lang><lang>python</lang></languages> */ note that if one wishes to make comparisons of retrieved attributes with other strings, it is necessary to convert the attribute first, even though the attribute may be converted to a string when used in other contexts (such as insertion into a text
box).
...ace in the html tag var xhtml = <html><head><title></title></head><body> <p>text</p></body></html>; alert(xhtml.head); // no need to specify a namespace on subelements here either non-default var xhtml = <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>embedded svg demo</title> </head> <body> <h1>embedded svg demo</h1> <svg xmlns="http://www.w3.org/2000/svg" view
box="0 0 100 100"> <circle cx="50" cy="50" r="20" stroke="orange" stroke-width="2px" fill="yellow" /> </svg> </body> </html>; alert(xhtml.name().localname); // alerts "html" alert(xhtml.name().uri); // alerts "http://www.w3.org/1999/xhtml" to access elements that are within a non-default namespace, first create a namespace object encapsulating the uri for that namespace: ...
A first splash into JavaScript - Learn web development
if it is, the player has guessed correctly and the game is won, so we show the player a congratulations message with a nice green color, clear the contents of the low/high guess information
box, and run a function called setgameover(), which we'll discuss later.
...try entering the below lines, one by one: guesses.style.backgroundcolor = 'yellow'; guesses.style.fontsize = '200%'; guesses.style.padding = '10px'; guesses.style.
boxshadow = '3px 3px 6px black'; every element on a page has a style property, which itself contains an object whose properties contain all the inline css styles applied to that element.
What is JavaScript? - Learn web development
a high-level definition javascript is a scripting or programming language that allows you to implement complex features on web pages — every time a web page does more than just sit there and display static information for you to look at — displaying timely content updates, interactive maps, animated 2d/3d graphics, scrolling video juke
boxes, etc.
...we can mark it up using html to give it structure and purpose: <p>player 1: chris</p> then we can add some css into the mix to get it looking nice: p { font-family: 'helvetica neue', helvetica, sans-serif; letter-spacing: 1px; text-transform: uppercase; text-align: center; border: 2px solid rgba(0,0,200,0.6); background: rgba(0,0,200,0.3); color: rgba(0,0,200,0.6);
box-shadow: 1px 1px 2px rgba(0,0,200,0.4); border-radius: 10px; padding: 3px 10px; display: inline-block; cursor: pointer; } and finally, we can add some javascript to implement dynamic behaviour: const para = document.queryselector('p'); para.addeventlistener('click', updatename); function updatename() { let name = prompt('enter a new name'); para.textcontent = 'player 1: ' + name;...
Aprender y obtener ayuda - Learn web development
some of the articles will be tutorials, to teach you a certain technique or important concept (such as "learn how to create a video player" or "learn the css
box model"), and some of the articles will be reference material, to allow you to look up details you may have forgotten (such as "what is the syntax of the css background property"?) mdn web docs is very good for both types — the area you are currently in is great for learning techniques and concepts, and we also have several giant reference sections allowing you to look up any syntax you can't r...
...nal web developers have created lots of horizontal navigation menus, so they'll immediately start thinking of a solution like this: a nav menu is usually created from a list of links, something like: <ul> <li>first menu item</li> <li>second menu item</li> <li>third menu item</li> <li>etc.</li> </ul> to make all the items sit horizontally on a line, the easiest modern way is to use flex
box: ul { display: flex; } to remove unneeded spacing and bullet points, we can do this: ul { list-style-type: none; padding: 0; } etc.
Introduction to the server side - Learn web development
in contrast, you would almost never consider writing the server-side component of a web app without a framework — implementing a vital feature like an http server is really hard to do from scratch in say python, but python web frameworks like django provide one out of the
box, along with other very useful tools.
... now try typing "favourite" in the search
box and observe the autocomplete search predictions.
Working with Svelte stores - Learn web development
fter ms milliseconds } } $: onmessagechange($alert, ms) // whenever the alert store or the ms props changes run onmessagechange ondestroy(()=> cleartimeout(timeout)) // make sure we clean-up the timeout </script> and update the alert.svelte markup section like so: {#if visible} <div on:click={() => visible = false}> <svg xmlns="http://www.w3.org/2000/svg" view
box="0 0 20 20"><path d="m12.432 0c1.34 0 2.01.912 2.01 1.957 0 1.305-1.164 2.512-2.679 2.512-1.269 0-2.009-.75-1.974-1.99c9.789 1.436 10.67 0 12.432 0zm8.309 20c-1.058 0-1.833-.652-1.093-3.524l1.214-5.092c.211-.814.246-1.141 0-1.141-.317 0-1.689.562-2.502 1.117l-.528-.88c2.572-2.186 5.531-3.467 6.801-3.467 1.057 0 1.233 1.273.705 3.23l-1.391 5.352c-.246.945-.141 1.271.106 1.271.317 0 1.357-.392 2.37...
...for security reasons the svelte repl works in a sand
boxed environment which will not let you access web torage, and you will get a "the operation is insecure" error.
Command line crash course - Learn web development
out of the
box, here are just a few of the things the command line can do, along with names of relevant tools in each case: navigate your computer’s file system along with base level tasks such as create, copy, rename and delete: move around your directory structure: cd create directories: mkdir create files (and modify their metadata): touch copy files: cp move files: mv delete files ...
...this means your operating system provides it out of the
box, and also that you can’t accidentally delete it — thank goodness!
Introducing a complete toolchain - Learn web development
out of the
box, eslint is going to complain that it can't find the configuration file if you run it.
... until then, parcel will do the transformation between nested css and natively supported css with the help of postcss, which parcel works with out of the
box.
Package management basics - Learn web development
without modern build tools, dependencies like this might be included in your project using a simple <script> element, but this might not work right out of the
box and you will likely need some modern tooling to bundle your code and dependencies together when they are released on the web.
... to see local dependencies really shine, all you need to do is try to download and run an existing project — if it works and all the dependencies work right out of the
box, then you have local dependencies to thank for the fact that the code is portable.
What to do and what not to do in Bugzilla
basically, anything that prevents builds from building, running, or being used for dogfood (able to use bugzilla, tinder
box, lxr, etc.) is a blocker.
...when performing bug reassignments, keep the following things in mind: always remember to check the reassign to default owner and qa contact radio button under the comment text
box.
Makefiles - Best practices and suggestions
dependency builds - a second invocation of make within a sand
box should always be a nop.
...##################################################### ## extra dep needed to synchronize parallel execution ##################################################### $(ts): $(ts)/.done $(ts)/.done: $(mkdir) -p $(dir $@) touch $@ # "clean" target garbage_dirs += $(ts) maintain clean targets - makefiles should be able to remove all content that is generated so "make clean" will return the sand
box/directory back to a clean state.
Gecko Logging
e10s note when a content process is in sand
box, it cannot write to stderr or any file.
... you may need to set preference security.sand
box.content.level to 0 to see the log.
Multiple Firefox profiles
when the properties dialog
box pops up, you should see a "target" text field that you can edit, and it should show the current file path.
... when the properties dialog
box pops up, you should see a "target" text field that you can edit, and it should show the current file path.
Limitations of frame scripts
security restrictions on file access processes that host remote content are isolated from the local system through a content security sand
box.
... one of the functions of the sand
box is to restrict access to the local file system by processes that host remote content.
CSS <display-xul> component
firefox supports the following -moz- prefixed xul display values: syntax -moz-
box obsolete since gecko 64 xul
box, mostly equivalent to flex -moz-inline-
box obsolete since gecko 64 xul inline
box, mostly equivalent to inline-flex -moz-grid obsolete since gecko 62 xul grid -moz-inline-grid obsolete since gecko 62 xul inline grid -moz-grid-group obsolete since gecko 62 xul grid group -moz-grid-line obsolete since gecko 62 xul grid line -moz-stack obsolete since gecko 62 xul stack -moz-inline-stack obsolete since gecko 62 xul inline stack -moz-deck obsolete since gecko 62 xul deck -moz-popup obsolete since gecko 62 xul popup all xul display values, with the exception of -moz-
box and -moz-inline-
box, have been removed in bug 1288572.
... the -moz-
box and -moz-inline-
box values will be removed later in bug 879275.
Chrome-only CSS reference
tree-separatoractivated by the properties attribute.::-moz-tree-twistyactivated by the properties attribute.css -moz-bool-pref() @supports functionthe -moz-bool-pref() @supports condition is available to gecko chrome and ua stylesheets to check if a boolean preference is enabled.css <display-xul> component</display-xul>firefox supports the following -moz- prefixed xul display values:overflow-clip-
boxthe overflow-clip-
box css property specifies relative to which
box the clipping happens when there is an overflow.
... it is short hand for the overflow-clip-
box-inline and overflow-clip-
box-block properties.overflow-clip-
box-blockthe overflow-clip-
box-block css property specifies relative to which
box the clipping happens when there is an overflow — in the block direction.overflow-clip-
box-inlinethe overflow-clip-
box-inline css property specifies relative to which
box the clipping happens when there is an overflow — in the inline direction.
console - Web APIs
border and its longhand equivalents border-radius
box-decoration-break
box-shadow clear and float color cursor display font and its longhand equivalents line-height margin outline and its longhand equivalents padding text-* properties such as text-transform white-space word-spacing and word-break writing-mode note: the console message behaves like an inline element by default.
... for example, given this code: console.time("answer time"); alert("click to continue"); console.timelog("answer time"); alert("do a bunch of other stuff..."); console.timeend("answer time"); will log the time needed by the user to dismiss the alert
box, log the time to the console, wait for the user to dismiss the second alert, and then log the ending time to the console: notice that the timer's name is displayed both when the timer is started and when it's stopped.
DOMMatrixReadOnly.flipX() - Web APIs
note that the x co-ordinate of the view
box attribute is negative, showing us content from both sides of the x-axis.
... <svg width="100" height="100" view
box="-50 0 100 100"> <path fill="red" d="m 0 50 l 50 0 l 50 100 z" /> <path id="flipped" fill="blue" d="m 0 50 l 50 0 l 50 100 z" /> </svg> this javascript first creates an identity matrix, then uses the `flipx()` method to create a new matrix, which is then applied to the blue triangle, inverting it across the x-axis.
DOMRect - Web APIs
the type of
box represented by the domrect is specified by the method or property that returned it.
... <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;" view
box="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/domrectreadonly" target="_top"><rect x="1" y="1" width="150" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="76" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">domrectreadonly</text></a><polyline points...
DataTransferItem.webkitGetAsEntry() - Web APIs
<p>drag files and/or directories to the
box below!</p> <div id="dropzone"> <div id="
boxtitle"> drop files here </div> </div> <h2>directory tree:</h2> <ul id="listing"> </ul> css content the styles used by the example are shown here.
... #dropzone { text-align: center; width: 300px; height: 100px; margin: 10px; padding: 10px; border: 4px dashed red; border-radius: 10px; } #
boxtitle { display: table-cell; vertical-align: middle; text-align: center; color: black; font: bold 2em "arial", sans-serif; width: 300px; height: 100px; } body { font: 14px "arial", sans-serif; } javascript content first, let's look at the recursive scanfiles() function.
Document - Web APIs
<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;" view
box="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25...
... document.get
boxobjectfor() use the element.getboundingclientrect() method instead.
Element.getElementsByClassName() - Web APIs
however the following code will not work as one might expect because "matches" will change as soon as any "color
box" class is removed.
... var matches = element.getelementsbyclassname('color
box'); for (var i=0; i<matches.length; i++) { matches[i].classlist.remove('color
box'); matches.item(i).classlist.add('hueframe'); } instead, use another method, such as: var matches = element.getelementsbyclassname('color
box'); while (matches.length > 0) { matches.item(0).classlist.add('hueframe'); matches[0].classlist.remove('color
box'); } this code finds descendant elements with the "color
box" class, adds the class "hueframe", by calling item(0), then removes "color
box" (using array notation).
Element.querySelectorAll() - Web APIs
examples dataset selector & attribute selectors <section class="
box" id="sect1"> <div class="funnel-chart-percent1">10.900%</div> <div class="funnel-chart-percent2">3700.00%</div> <div class="funnel-chart-percent3">0.00%</div> </section> // dataset selectors const refs = [...document.queryselectorall(`[data-name*="funnel-chart-percent"]`)]; // attribute selectors // const refs = [...document.queryselectorall(`[class*="funnel-chart-percent"]`)]; // const ...
...refs = [...document.queryselectorall(`[class^="funnel-chart-percent"]`)]; // const refs = [...document.queryselectorall(`[class$="funnel-chart-percent"]`)]; // const refs = [...document.queryselectorall(`[class~="funnel-chart-percent"]`)]; obtaining a list of matches to obtain a nodelist of all of the <p> elements contained within the element "my
box": var matches = my
box.queryselectorall("p"); this example returns a list of all <div> elements within "my
box" with a class of either "note" or "alert": var matches = my
box.queryselectorall("div.note, div.alert"); here, we get a list of the document's <p> elements whose immediate parent element is a div with the class "highlighted" and which are located inside a container whose id is "test".
Using files from web applications - Web APIs
you need to provide a visual cue for the focus status of the hidden input field on its label, be it an outline as shown above, or background-color or
box-shadow.
...exactly what part of your content will accept drops may vary depending on the design of your application, but making an element receive drop events is easy: let drop
box; drop
box = document.getelementbyid("drop
box"); drop
box.addeventlistener("dragenter", dragenter, false); drop
box.addeventlistener("dragover", dragover, false); drop
box.addeventlistener("drop", drop, false); in this example, we're turning the element with the id drop
box into our drop zone.
FileSystem - Web APIs
instead you will have a "virtual drive" within the browser sand
box.
... basic concepts there are two ways to get access to a filesystem object: you can directly ask for one representing a sand
boxed file system created just for your web app directly by calling window.requestfilesystem().
FileSystemDirectoryReader.readEntries() - Web APIs
<p>drag files and/or directories to the
box below!</p> <div id="dropzone"> <div id="
boxtitle"> drop files here </div> </div> <h2>directory tree:</h2> <ul id="listing"> </ul> css content the styles used by the example are shown here.
... #dropzone { text-align: center; width: 300px; height: 100px; margin: 10px; padding: 10px; border: 4px dashed red; border-radius: 10px; } #
boxtitle { display: table-cell; vertical-align: middle; text-align: center; color: black; font: bold 2em "arial", sans-serif; width: 300px; height: 100px; } body { font: 14px "arial", sans-serif; } javascript content first, let's look at the recursive scanfiles() function.
File and Directory Entries API - Web APIs
you can develop apps which read, write, and create files and/or directories in a virtual, sand
boxed file system.
... other interfaces localfilesystem gives you access to a sand
boxed file system.
HTMLDialogElement.close() - Web APIs
<!-- simple pop-up dialog
box, containing a form --> <dialog id="favdialog"> <form method="dialog"> <section> <p><label for="favanimal">favorite animal:</label> <select id="favanimal" name="favanimal"> <option></option> <option>brine shrimp</option> <option>red panda</option> <option>spider monkey</option> </select></p> </section> <menu> ...
...vanimal'; function opencheck(dialog) { if(dialog.open) { console.log('dialog open'); } else { console.log('dialog closed'); } } // update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog
box cancelbutton.addeventlistener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> note: you can find this example on github as htmldialogelement-basic (see it live also).
HTMLDialogElement.open - Web APIs
<!-- simple pop-up dialog
box, containing a form --> <dialog id="favdialog"> <form method="dialog"> <section> <p><label for="favanimal">favorite animal:</label> <select id="favanimal" name="favanimal"> <option></option> <option>brine shrimp</option> <option>red panda</option> <option>spider monkey</option> </select></p> </section> <menu> ...
...vanimal'; function opencheck(dialog) { if(dialog.open) { console.log('dialog open'); } else { console.log('dialog closed'); } } // update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog
box cancelbutton.addeventlistener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> note: you can find this example on github as htmldialogelement-basic (see it live also).
HTMLDialogElement.show() - Web APIs
<!-- simple pop-up dialog
box, containing a form --> <dialog id="favdialog"> <form method="dialog"> <section> <p><label for="favanimal">favorite animal:</label> <select id="favanimal" name="favanimal"> <option></option> <option>brine shrimp</option> <option>red panda</option> <option>spider monkey</option> </select></p> </section> <menu> ...
...vanimal'; function opencheck(dialog) { if(dialog.open) { console.log('dialog open'); } else { console.log('dialog closed'); } } // update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog
box cancelbutton.addeventlistener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> specifications specification status comment html living standardthe definition of 'show()' in that specification.
HTMLDialogElement.showModal() - Web APIs
<!-- simple pop-up dialog
box, containing a form --> <dialog id="favdialog"> <form method="dialog"> <section> <p><label for="favanimal">favorite animal:</label> <select id="favanimal" name="favanimal"> <option></option> <option>brine shrimp</option> <option>red panda</option> <option>spider monkey</option> </select></p> </section> <menu> ...
...vanimal'; function opencheck(dialog) { if(dialog.open) { console.log('dialog open'); } else { console.log('dialog closed'); } } // update button opens a modal dialog updatebutton.addeventlistener('click', function() { dialog.showmodal(); opencheck(dialog); }); // form cancel button closes the dialog
box cancelbutton.addeventlistener('click', function() { dialog.close('animalnotchosen'); opencheck(dialog); }); })(); </script> note: you can find this example on github as htmldialogelement-basic (see it live also).
NotificationAction - Web APIs
the user can also click the main body of the notification to open their in
box instead.
...egistration.shownotification("new mail from alice", { actions: [ { action: 'archive', title: 'archive' } ] }); self.addeventlistener('notificationclick', function(event) { event.notification.close(); if (event.action === 'archive') { // archive action was clicked archiveemail(); } else { // main body of notification was clicked clients.openwindow('/in
box'); } }, false); specifications specification status comment notifications api living standard living standard ...
PaymentAddress.addressLine - Web APIs
these lines may include the street name, house number, apartment number, rural delivery route, descriptive instructions, or post office
box.
...for example, the addressline array for the mozilla space in london would have the following entries: example showing addressline entries for an address in london index addressline[] value 0 metal
box factory 1 suite 441, 4th floor 2 30 great guildford street these, combined with additional values for other properties of the paymentaddress, would represent the full address, which is: mozilla metal
box factory suite 441, 4th floor 30 great guildford street london se1 0hs united kingdom specifications specification status comment payment request apithe definition...
Pointer Lock API - Web APIs
while iframes work by default, "sand
boxed" iframes block pointer lock.
... the ability to avoid this limitation, in the form of the attribute/value combination <iframe sand
box="allow-pointer-lock">, is expected to appear in chrome soon.
RTCDTMFToneChangeEvent - Web APIs
it appends each tone to a display
box as it's played, and, once all tones have been sent, re-enabled a previously-disabled "send" button, allowing the next dmtf string to be entered.
... dtmfsender.addeventlistener("change", function(event) { if (event.tone !== "") { dialstring
box.innertext += event.tone; } else { senddtmfbutton.disabled = false; } }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdtmftonechangeevent' in that specification.
RTCDataChannel: close event - Web APIs
dc.addeventlistener("close", ev => { messageinput
box.disabled = true; sendbutton.disabled = true; connectbutton.disabled = false; disconnectbutton.disabled = true; }, false); all this code does in response to receiving the close event is to disable an input
box and its "send" button, and to enable the button used to start a call (while disabling the one that ends a call).
... you can also use the onclose event handler property to set a handler for close events: dc.onclose = ev => { messageinput
box.disabled = true; sendbutton.disabled = true; connectbutton.disabled = false; disconnectbutton.disabled = true; } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'close' in that specification.
RTCDataChannel.onerror - Web APIs
the error handler passes information about the error to a ui library's alert
box function to present an error message to the user.
... let pc = new rtcpeerconnection(); let dc = pc.createdatachannel("playercontrol"); dc.onerror = function(event) { myuilibrary.doalert
box({ 'network error', // alert title 'the error "' + event.message + '" occurred while handling player control network messages.', event.filename, event.lineno, event.colno }); } /* ...
RTCPeerConnection.getStats() - Web APIs
br>\n`; // now the statistics for this report; we intentially drop the ones we // sorted to the top above object.keys(report).foreach(statname => { if (statname !== "id" && statname !== "timestamp" && statname !== "type") { statsoutput += `<strong>${statname}:</strong> ${report[statname]}<br>\n`; } }); }); document.queryselector(".stats-
box").innerhtml = statsoutput; }); }, 1000); this works by calling getstats(), then, when the promise is resolved, iterates over the rtcstats objects on the returned rtcstatsreport.
... once the html for the report is generated, it is injected into the element whose class is "stats-
box" by setting its innerhtml property.
RTCTrackEvent - Web APIs
example this simple example creates an event listener for the track event which sets the srcobject of the <video> element with the id video
box to the first stream in the list passed in the event's streams array.
... peerconnection.addeventlistener("track", e => { let videoelement = document.getelementbyid("video
box"); videoelement.srcobject = e.streams[0]; }, false); specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtctrackevent' in that specification.
ResizeObserver() - Web APIs
the resizeobserver constructor creates a new resizeobserver object, which can be used to report changes to the content or border
box of an element or the bounding
box of an svgelement.
...llow a pattern along the lines of: function(entries, observer) { for (let entry of entries) { // do something to each entry // and possibly something to the observer itself } } examples the following snippet is taken from the resize-observer-text.html (see source) example: const resizeobserver = new resizeobserver(entries => { for (let entry of entries) { if(entry.content
boxsize) { h1elem.style.fontsize = math.max(1.5, entry.content
boxsize.inlinesize/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.content
boxsize.inlinesize/600) + 'rem'; } else { h1elem.style.fontsize = math.max(1.5, entry.contentrect.width/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width/600) + 'rem'; } } }); resizeobserver.observe(div...
ResizeObserver.unobserve() - Web APIs
examples the following snippet is taken from the resize-observer-text.html (see source) example: const resizeobserver = new resizeobserver(entries => { for (let entry of entries) { if(entry.content
boxsize) { h1elem.style.fontsize = math.max(1.5, entry.content
boxsize.inlinesize/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.content
boxsize.inlinesize/600) + 'rem'; } else { h1elem.style.fontsize = math.max(1.5, entry.contentrect.width/200) + 'rem'; pelem.style.fontsize = math.max(1, entry.contentrect.width/600) + 'rem'; } } }); resizeobserver.observe(div...
...elem); check
box.addeventlistener('change', () => { if(check
box.checked) { resizeobserver.observe(divelem); } else { resizeobserver.unobserve(divelem); } }); specifications specification status comment resize observerthe definition of 'unobserve()' in that specification.
SVGCircleElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 700 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="25" x2="151" y...
... example svg content <svg xmlns="http://www.w3.org/2000/svg" view
box="0 0 250 250" width="250" height="250"> <circle cx="100" cy="100" r="50" fill="gold" id="circle" onclick="clickcircle();"/> </svg> javascript content this function clickcircle() is called when the circle is clicked.
SVGGraphicsElement: paste event - Web APIs
example html <?xml version="1.0" encoding="utf-8"?> <svg view
box="0 0 140 30" width="600" height="320" xmlns="http://www.w3.org/2000/svg"> <foreignobject x="5" y="-10" width="90" height="20"> <input xmlns="http://www.w3.org/1999/xhtml" value="copy this text"/> </foreignobject> <text x="5" y="30" id="element-to-paste-text" tabindex="1">paste it here</text> </svg> css input { font-size: 10px; width: 100%; height: 90%;
box-sizing: bo...
...rder-
box; border: 1px solid black; } javascript document.getelementbyid("element-to-paste-text").addeventlistener("paste", evt => { evt.target.textcontent = evt.clipboarddata.getdata("text/plain").touppercase(); evt.preventdefault(); }); result specifications specification status comment scalable vector graphics (svg) 2 candidate recommendation definition that the clipboard events apply to svg elements.
SVGGraphicsElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4d...
... svggraphicselement.getb
box() returns a domrect representing the computed bounding
box of the current element.
SVGTextContentElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 20%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 120" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,2...
... svgtextcontentelement.getextentofchar() returns a domrect representing the computed tight bounding
box of the glyph cell that corresponds to a given typographic character.
SVGUnitTypes - Web APIs
<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;" view
box="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/svgunittypes" target="_top"><rect x="1" y="1" width="120" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="61" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgunittypes</text></a></svg></div> a:...
... svg_unit_type_objectbounding
box 2 corresponds to the value objectbounding
box.
WebGL best practices - Web APIs
demo: https://jdashg.github.io/misc/webgl/device-pixel-presnap.html resizeobserver and 'device-pixel-content-
box' on supporting browsers (chromium?), resizeobserver can be used with 'device-pixel-content-
box' to request a callback that includes the true device pixel size of an element.
... this can be used to build an async-but-accurate function: window.getdevicepixelsize = window.getdevicepixelsize || async function(elem) { await new promise(fn_resolve => { const observer = new resizeobserver(entries => { for (const cur of entries) { const dev_size = cur.devicepixelcontent
boxsize; const ret = { width: dev_size[0].inlinesize, height: dev_size[0].blocksize, }; fn_resolve(ret); observer.disconnect(); return; } throw 'device-pixel-content-
box not observed for elem ' + elem; }); observer.observe(elem, {
box: 'device-pixel-content-
box'}); }); }; please refer to the specification for more details.
Writing WebSocket client applications - Web APIs
there are assorted types of data packets the client might receive, such as: login handshake message text user list updates the code that interprets these incoming messages might look like this: examplesocket.onmessage = function(event) { var f = document.getelementbyid("chat
box").contentdocument; var text = ""; var msg = json.parse(event.data); var time = new date(msg.date); var timestr = time.tolocaletimestring(); switch(msg.type) { case "id": clientid = msg.id; setusername(); break; case "username": text = "<b>user <em>" + msg.name + "</em> signed in at " + timestr + "</b><br>"; break; case "message": text = "...
...estr + ") <b>" + msg.name + "</b>: " + msg.text + "<br>"; break; case "rejectusername": text = "<b>your username has been set to <em>" + msg.name + "</em> because the name you chose is in use.</b><br>" break; case "userlist": var ul = ""; for (i=0; i < msg.users.length; i++) { ul += msg.users[i] + "<br>"; } document.getelementbyid("userlist
box").innerhtml = ul; break; } if (text.length) { f.write(text); document.getelementbyid("chat
box").contentwindow.scrollbypages(1); } }; here we use json.parse() to convert the json object back into the original object, then examine and act upon its contents.
Migrating from webkitAudioContext - Web APIs
new engines implementing the web audio spec (such as gecko) will only implement the official, final version of the specification, which means that code using webkitaudiocontext or old naming conventions in the web audio specification may not immediately work out of the
box in a compliant web audio implementation.
... note: there is a library called webkitaudiocontext monkeypatch, which automatically fixes some of these changes to make most code targetting webkitaudiocontext to work on the standards based audiocontext out of the
box, but it currently doesn't handle all of the cases below.
Window.alert() - Web APIs
the following text is shared between this article, dom:window.prompt and dom:window.confirm dialog
boxes are modal windows - they prevent the user from accessing the rest of the program's interface until the dialog
box is closed.
... for this reason, you should not overuse any function that creates a dialog
box (or modal window).
WindowOrWorkerGlobalScope.setInterval() - Web APIs
<!doctype html> <html> <head> <meta charset="utf-8" /> <title>setinterval/clearinterval example</title> <script> var nintervid; function changecolor() { nintervid = setinterval(flashtext, 1000); } function flashtext() { var oelem = document.getelementbyid('my_
box'); oelem.style.color = oelem.style.color == 'red' ?
... } function stoptextcolor() { clearinterval(nintervid); } </script> </head> <body onload="changecolor();"> <div id="my_
box"> <p>hello world</p> </div> <button onclick="stoptextcolor();">stop</button> </body> </html> example 3: typewriter simulation the following example simulates typewriter by first clearing and then slowly typing content into the nodelist that matches a specified group of selectors.
msRegionOverflow - Web APIs
syntax string = object.msregionoverflow values type:domstring overflow: the region element's content overflows the region's content
box.
... fit: the region element's content fits into the region's content
box.
Using the alert role - Accessibility
the pseudo code snippet below illustrates this approach: <p id="forminstruction">you must select at least 3 options</p> // when the user tries to submit the form with less than 3 check
boxes selected: document.getelementbyid("forminstruction").setattribute("role", "alert"); example 4: making an element with an alert role visible if an element already has role="alert" and is initially hidden using css, making it visible will cause the alert to fire as if it was just added to the page.
... .hidden { display:none; } <p id="expirationwarning" role="alert" class="hidden">your log in session will expire in 2 minutes</p> // removing the 'hidden' class makes the element visible, which will make the screen reader announce the alert: document.getelementbyid("expirationwarning").classname = ""; working examples: alert role example using an aria alert
box alert example using a modal aria dialog
box notes using the alert role on an element implies that element has aria-live="assertive".
Using ARIA: Roles, states, and properties - Accessibility
roles widget roles button check
box gridcell link menuitem menuitemcheck
box menuitemradio option progressbar radio scrollbar search
box separator (when focusable) slider spinbutton switch tab tabpanel text
box treeitem composite roles the techniques below describe each composite role as well as their required and optional child roles.
... combo
box grid (including row, gridcell, rowheader, columnheader roles) list
box (including option role) menu menubar radiogroup (see radio role) tablist (including tab and tabpanel roles) tree treegrid document structure roles application article cell columnheader definition directory document feed figure group heading img list listitem math none note presentation row rowgroup rowheader separator table term text
box toolbar tooltip landmark roles banner complementary contentinfo form main navigation region search live region roles alert log marquee status timer window roles alertdialog dialog states and properties widget attributes aria-autocomplete aria-checked aria-current aria-disabled aria-errormessag...
ARIA annotations - Accessibility
</p> we could even provide an information
box saying who made the suggestion and when, and associate it with the suggestion via aria-details: <p>freida’s pet is a <span role="suggestion" aria-details="comment-source"><span role="deletion">black cat called luna</span><span role="insertion">purple tyrannosaurus rex called tiny</span></span>.
... let’s say we have a comment
box like so: <div role="comment" id="thread-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> we’ve used role="comment" to mark this up as a comment.
ARIA: button role - Accessibility
a third mixed state is available for toggle buttons that control other elements, such as other toggle buttons or check
boxes, which do not all share the same value.
... try the example by adding a name to the text
box.
overview - Accessibility
general resources dhtml style guide provides keyboard interaction recommendations wai-aria authoring practices guide check
box aria toggle button and tri-state check
box examples (from "the paciello group blog") aria example check
box widgets from the university of illinois menu using wai-aria roles and states with the yui menu control slider from the paciello group blog: aria slider, part one, part two, part threet (example) creating an accessible, internationalized dojo rating widget tabs enhancing tabview accessibility with wai-aria roles and states, from the yui blog enhancing the jquery ui tabs accordingly to wcag 2.0 and ...
...aria tab panel example here on codetalks light
box wcag 2.0 and aria-conformant light
box application http://majx-js.digissime.net/js/popin/ form validation wcag 2.0 and aria-conformant live form validation tables german tutorial on creating an accessible form simple grid example at codetalks date picker grid at codetalks wcag 2.0 and aria-conformant sortable tables ...
An overview of accessible web applications and widgets - Accessibility
presentational changes dynamic presentational changes include using css to change the appearance of content (such as a red border around invalid data, or changing the background color of a checked check
box), as well as showing or hiding content.
...examples include (but are certainly not limited to): aria-checked: indicates the state of a check
box or radio button aria-disabled: indicates that an element is visible, but not editable or otherwise operable aria-grabbed: indicates the 'grabbed' state of an object in a drag-and-drop operation (for a full list of aria states, consult the aria list of states and properties.) developers should use aria states to indicate the state of ui widget elements and use css attribute selectors to alter the visual appearance based on the state changes (rather than using script to change a class name on the element).
Cognitive accessibility - Accessibility
examples of this are checking a check
box, entering data or changing a select option.
...also, be sure to include a confirmation check
box in addition to a submit button.
HTML To MSAA - Accessibility
em_ default if @type attribute has value "submit" n/a "press" n/a input @type=text, textarea role_system_ text n/a value property of input dom element state_system_ readonly if @readonly attribute is used n/a "activate" n/a input @type=password role_system_ text n/a n/a state_system_ readonly if @readonly attribute is used state_system_ protected n/a "activate" n/a input type="check
box" role_system_ checkbutton n/a n/a state_system_ marqueed used as state checkable state_system_ mixed for html 5 if intermediate property of dom element returns true state_system_ checked if checked property of dom element returns true n/a "check"/"uncheck"/"cycle" depending on state event_object_ statechange when state is changed input type="radio" role_system_ radiobutton n/a n/a state_sy...
... option role_system_ listitem from @label attribute, from child text nodes n/a state_system_ selected if option is selected n/a "select" event_object_ selectionwithin event_object_ selectionadd if selected event_object_ selectionremove if unselected select @size > 1 role_system_ list n/a n/a state_system_ multiselectable if multiselectable n/a n/a n/a select @size = 1 role_system_ combo
box n/a name of focused option state_system_ expanded if combo
box open state_system_ collapsed if combo
box is collapsed state_system_ haspopup state_system_ focusable n/a "open"/"close" depending on state event_object_ valuechange when selected option is changed table role_system_ table from @summary attribute n/a described_by (0x100e) points to caption element n/a n/a td, th role_syste...
Mobile accessibility checklist - Accessibility
non-standard controls must have an appropriate aria role assigned to them, such as button, link, or check
box.
... handling state standard controls such as radio buttons and check
boxes are handled by the operating system.
border-start-end-radius - CSS: Cascading Style Sheets
percentages for the horizontal axis refer to the width of the
box, percentages for the vertical axis refer to the height of the
box.
...it also applies to ::first-letter.inheritednopercentagesrefer to the corresponding dimension of the border
boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples border radius with vertical text html <div> <p class="exampletext">example</p> </div> css div { background-color: rebeccapurple; width: 120px; height: 120px; border-start-end-radius: 10px; } .exampletext {...
border-start-start-radius - CSS: Cascading Style Sheets
percentages for the horizontal axis refer to the width of the
box, percentages for the vertical axis refer to the height of the
box.
...it also applies to ::first-letter.inheritednopercentagesrefer to the corresponding dimension of the border
boxcomputed valuetwo absolute <length>s or <percentage>sanimation typea length, percentage or calc(); formal syntax <length-percentage>{1,2}where <length-percentage> = <length> | <percentage> examples border radius with vertical text html <div> <p class="exampletext">example</p> </div> css div { background-color: rebeccapurple; width: 120px; height: 120px; border-start-start-radius: 10px; } .exampletext...
border-top-color - CSS: Cascading Style Sheets
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples a simple div with a border html <div class="my
box"> <p>this is a
box with a border around it.
... note which side of the
box is <span class="redtext">red</span>.</p> </div> css .my
box { border: solid 0.3em gold; border-top-color: red; width: auto; } .redtext { color: red; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border-top-color' in that specification.
border - CSS: Cascading Style Sheets
)where <alpha-value> = <number> | <percentage><hue> = <number> | <angle> examples setting a pink outset border html <div>i have a border, an outline, and a
box shadow!
... amazing, isn't it?</div> css div { border: 0.5rem outset pink; outline: 0.5rem solid khaki;
box-shadow: 0 0 0 2rem skyblue; border-radius: 12px; font: bold 1rem sans-serif; margin: 2rem; padding: 1rem; outline-offset: 0.5rem; } result specifications specification status comment css backgrounds and borders module level 3the definition of 'border' in that specification.
column-count - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toblock containers except table wrapper
boxesinheritednocomputed valueas specifiedanimation typean integer formal syntax <integer> | auto examples splitting a paragraph across three columns html <p class="content-
box"> this is a bunch of text split into three columns using the css `column-count` property.
...</p> css .content-
box { column-count: 3; } result specifications specification status comment css multi-column layout modulethe definition of 'column-count' in that specification.
column-fill - CSS: Cascading Style Sheets
formal definition initial valuebalanceapplies tomulticol elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax auto | balance | balance-all examples splitting text evenly across columns html <p class="content-
box"> this is a bunch of text split into multiple columns.
...</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-rule - CSS: Cascading Style Sheets
al syntax <'column-rule-width'> | <'column-rule-style'> | <'column-rule-color'> examples example 1 /* same as "medium dotted currentcolor" */ p.foo { column-rule: dotted; } /* same as "medium solid blue" */ p.bar { column-rule: solid blue; } /* same as "8px solid currentcolor" */ p.baz { column-rule: solid 8px; } p.abc { column-rule: thick inset blue; } example 2 html <p class="content-
box"> this is a bunch of text split into three columns.
...</p> css .content-
box { padding: 0.3em; background: #ff7; column-count: 3; column-rule: inset 2px #33f; } result specifications specification status comment css multi-column layout modulethe definition of 'column-rule' in that specification.
column-width - CSS: Cascading Style Sheets
formal definition initial valueautoapplies toblock containers except table wrapper
boxesinheritednocomputed valuethe absolute length, zero or largeranimation typea length formal syntax <length> | auto examples setting column width in pixels html <p class="content-
box"> lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
...</p> css .content-
box { column-width: 100px; } result specifications specification status comment css writing modes level 4the definition of 'column-width' in that specification.
columns - CSS: Cascading Style Sheets
formal definition initial valueas each of the properties of the shorthand:column-width: autocolumn-count: autoapplies toblock containers except table wrapper
boxesinheritednocomputed valueas each of the properties of the shorthand:column-width: the absolute length, zero or largercolumn-count: as specifiedanimation typeas each of the properties of the shorthand:column-width: a lengthcolumn-count: an integer formal syntax <'column-width'> | <'column-count'> examples setting three equal columns html <p class="content-
box"> this is a bunch of text spl...
...</p> css .content-
box { columns: 3 auto; } result specifications specification status comment css multi-column layout modulethe definition of 'columns' in that specification.
<display-listitem> - CSS: Cascading Style Sheets
the list-item keyword causes the element to generate a ::marker pseudo-element with the content specified by its list-style properties (for example a bullet point) together with a principal
box of the specified type for its own contents.
...if no outer value is specified, the principal
box will have an outer display type of block.
element() - CSS: Cascading Style Sheets
<div style="width:400px; height:400px; background:-moz-element(#mybackground1) no-repeat;"> <p>this
box uses the element with the #mybackground1 id as its background!</p> </div> <div style="overflow:hidden; height:0;"> <div id="mybackground1" style="width:1024px; height:1024px; background-image: linear-gradient(to right, red, orange, yellow, white);"> <p style="transform-origin:0 0; transform: rotate(45deg); color:white;">this text is part of the background.
... cool, huh?</p> </div> </div> the <div> element with the id "mybackground1" is used as the background for the content including the paragraph "this
box uses the element with the #mybackground1 id as its background!".
flex-grow - CSS: Cascading Style Sheets
d and e are flex-grow:2 .</h5> <div id="content"> <div class="
box" style="background-color:red;">a</div> <div class="
box" style="background-color:lightblue;">b</div> <div class="
box" style="background-color:yellow;">c</div> <div class="
box1" style="background-color:brown;">d</div> <div class="
box1" style="background-color:lightgreen;">e</div> <div class="
box" style="background-color:brown;">f</div> </div> css #content { display: flex; justify-...
...content: space-around; flex-flow: row wrap; align-items: stretch; } .
box { flex-grow: 1; border: 3px solid rgba(0,0,0,.2); } .
box1 { flex-grow: 2; border: 3px solid rgba(0,0,0,.2); } result specifications specification status comment css flexible
box layout modulethe definition of 'flex-grow' in that specification.
flex-shrink - CSS: Cascading Style Sheets
d and e have flex-shrink:2 set</p> <p>the width of d and e is less than the others.</p> <div id="content"> <div class="
box" style="background-color:red;">a</div> <div class="
box" style="background-color:lightblue;">b</div> <div class="
box" style="background-color:yellow;">c</div> <div class="
box1" style="background-color:brown;">d</div> <div class="
box1" style="background-color:lightgreen;">e</div> </div> css #content { display: flex; width: 500px; } #content div { flex-basis: 120px; border: 3px s...
...olid rgba(0,0,0,.2); } .
box { flex-shrink: 1; } .
box1 { flex-shrink: 2; } result specifications specification status comment css flexible
box layout modulethe definition of 'flex-shrink' in that specification.
flex-wrap - CSS: Cascading Style Sheets
see using css flexible
boxes for more properties and information.
...> <div class="blue">3</div> </div> css /* common styles */ .content, .content1, .content2 { color: #fff; font: 100 24px/100px sans-serif; height: 150px; text-align: center; } .content div, .content1 div, .content2 div { height: 50%; width: 300px; } .red { background: orangered; } .green { background: yellowgreen; } .blue { background: steelblue; } /* flex
box styles */ .content { display: flex; flex-wrap: wrap; } .content1 { display: flex; flex-wrap: nowrap; } .content2 { display: flex; flex-wrap: wrap-reverse; } results specifications specification status comment css flexible
box layout modulethe definition of 'flex-wrap' in that specification.
float - CSS: Cascading Style Sheets
it is shifted to the left, or right, until it touches the edge of its containing
box, or another floated element.
...additional squares would continue to stack to the right, until they filled the containing
box, after which they would wrap to the next line.
grid-column-end - CSS: Cascading Style Sheets
formal definition initial valueautoapplies togrid items and absolutely-positioned
boxes whose containing block is a grid containerinheritednocomputed valueas specifiedanimation typediscrete formal syntax <grid-line>where <grid-line> = auto | <custom-ident> | [ <integer> && <custom-ident>?
... ] | [ span && [ <integer> | <custom-ident> ] ] examples setting column end for a grid item html <div class="wrapper"> <div class="
box1">one</div> <div class="
box2">two</div> <div class="
box3">three</div> <div class="
box4">four</div> <div class="
box5">five</div> </div> css .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 100px; } .
box1 { grid-column-start: 1; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; } .
box2 { grid-column-start: 1; grid-row-start: 3; grid-row-end: 5; } * {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; col...
grid-column-start - CSS: Cascading Style Sheets
formal definition initial valueautoapplies togrid items and absolutely-positioned
boxes whose containing block is a grid containerinheritednocomputed valueas specifiedanimation typediscrete formal syntax <grid-line>where <grid-line> = auto | <custom-ident> | [ <integer> && <custom-ident>?
... ] | [ span && [ <integer> | <custom-ident> ] ] examples setting column start for a grid item html <div class="wrapper"> <div class="
box1">one</div> <div class="
box2">two</div> <div class="
box3">three</div> <div class="
box4">four</div> <div class="
box5">five</div> </div> css .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 100px; } .
box1 { grid-column-start: 1; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; } .
box2 { grid-column-start: 1; grid-row-start: 3; grid-row-end: 5; } * {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; c...
grid-row-end - CSS: Cascading Style Sheets
formal definition initial valueautoapplies togrid items and absolutely-positioned
boxes whose containing block is a grid containerinheritednocomputed valueas specifiedanimation typediscrete formal syntax <grid-line>where <grid-line> = auto | <custom-ident> | [ <integer> && <custom-ident>?
... ] | [ span && [ <integer> | <custom-ident> ] ] examples setting row end for a grid item html <div class="wrapper"> <div class="
box1">one</div> <div class="
box2">two</div> <div class="
box3">three</div> <div class="
box4">four</div> <div class="
box5">five</div> </div> css .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 100px; } .
box1 { grid-column-start: 1; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; } .
box2 { grid-column-start: 1; grid-row-start: 3; grid-row-end: 5; } * {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; color:...
grid-row-start - CSS: Cascading Style Sheets
formal definition initial valueautoapplies togrid items and absolutely-positioned
boxes whose containing block is a grid containerinheritednocomputed valueas specifiedanimation typediscrete formal syntax <grid-line>where <grid-line> = auto | <custom-ident> | [ <integer> && <custom-ident>?
... ] | [ span && [ <integer> | <custom-ident> ] ] examples setting row start for a grid item html <div class="wrapper"> <div class="
box1">one</div> <div class="
box2">two</div> <div class="
box3">three</div> <div class="
box4">four</div> <div class="
box5">five</div> </div> css .wrapper { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 100px; } .
box1 { grid-column-start: 1; grid-column-end: 4; grid-row-start: 1; grid-row-end: 3; } .
box2 { grid-column-start: 1; grid-row-start: 3; grid-row-end: 5; } * {
box-sizing: border-
box;} .wrapper { border: 2px solid #f76707; border-radius: 5px; background-color: #fff4e6; } .wrapper > div { border: 2px solid #ffa94d; border-radius: 5px; background-color: #ffd8a8; padding: 1em; colo...
line-break - CSS: Cascading Style Sheets
html <div lang="ja"> <p class="wrap
box auto">auto:<br>そこは湖のほとりで木々が輝いていた。<br>その景色に、美しいなぁと思わずつぶやいた。</p> <p class="wrap
box loose">loose:<br>そこは湖のほとりで木々が輝いていた。<br>その景色に、美しいなぁと思わずつぶやいた。</p> <p class="wrap
box normal">normal:<br>そこは湖のほとりで木々が輝いていた。<b...
...r>その景色に、美しいなぁと思わずつぶやいた。</p> <p class="wrap
box strict">strict:<br>そこは湖のほとりで木々が輝いていた。<br>その景色に、美しいなぁと思わずつぶやいた。</p> <p class="wrap
box anywhere">anywhere:<br>そこは湖のほとりで木々が輝いていた。<br>その景色に、美しいなぁと思わずつぶやいた。</p> </div> css .wrap
box { width: 10em; margin: 0.5em; white-space: normal; vertical-align: top; display: inline-block; } .auto { line-break: auto; } .loose { line-break: loose; } .normal { line-break: normal; } .strict { line-break: strict; } .anywhere { line-break: anywhere; } result specifications specification status comment css text module level 3the definitio...
linear-gradient() - CSS: Cascading Style Sheets
the gradient line is defined by the center of the
box containing the gradient image and by an angle.
...each of these two points is defined by the intersection of the gradient line with a perpendicular line passing from the
box corner which is in the same quadrant.
list-style-position - CSS: Cascading Style Sheets
chrome and safari both place this element on the same line as the marker
box, whereas firefox, internet explorer, and opera place it on the next line.
... outside the ::marker is outside the principal block
box.
margin-bottom - CSS: Cascading Style Sheets
it also applies to ::first-letter and ::first-line.inheritednopercentagesrefer to the width of the containing blockcomputed valuethe percentage as specified or the absolute lengthanimation typea length formal syntax <length> | <percentage> | auto examples setting positive and negative bottom margins html <div class="container"> <div class="
box0">
box 0</div> <div class="
box1">
box 1</div> <div class="
box2">
box one's negative margin pulls me up</div> </div> css css for divs to set margin-bottom and height .
box0 { margin-bottom:1em; height:3em; } .
box1 { margin-bottom:-1.5em; height:4em; } .
box2 { border:1px dashed black; border-width:1px 0; margin-bottom:2em; } some definitions for container and divs so m...
...argins' effects can be seen more clearly .container { background-color:orange; width:320px; border:1px solid black; } div { width:320px; background-color:gold; } result specifications specification status comment css basic
box modelthe definition of 'margin-bottom' in that specification.
mask-position - CSS: Cascading Style Sheets
values <position> one to four values representing a 2d position regarding the edges of the element's
box.
...note that the position can be set outside of the element's
box.
mask-size - CSS: Cascading Style Sheets
the mask positioning area is, by default, the area containing the content of the
box and its padding; the area may also be changed to just the content or to the area containing borders, padding and content.
...the image is letter
boxed within the container.
mask-type - CSS: Cascading Style Sheets
nition initial valueluminanceapplies to<mask> elementsinheritednocomputed valueas specifiedanimation typediscrete formal syntax luminance | alpha examples setting an alpha mask html <div class="redsquare"></div> <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="0" height="0"> <defs> <mask id="m" maskcontentunits="objectbounding
box" style="mask-type:alpha"> <rect x=".1" y=".1" width=".8" height=".8" fill="red" fill-opacity="0.7"/> </mask> </defs> </svg> css .redsquare { height: 100px; width: 100px; background-color: rgb(128, 128, 128); border: solid 1px black; mask: url("#m"); } result setting a luminance mask html <div class="redsquare"></div> <svg version="1.1" xmlns="http://w...
...ww.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="0" height="0"> <defs> <mask id="m" maskcontentunits="objectbounding
box" style="mask-type:luminance"> <rect x=".1" y=".1" width=".8" height=".8" fill="red" fill-opacity="0.7"/> </mask> </defs> </svg> css .redsquare { height: 100px; width: 100px; background-color: rgb(128, 128, 128); border: solid 1px black; mask: url("#m"); mask-type:luminance; } result specifications specification status comment css masking module level 1the definition of 'mask-type' in that specification.
offset-anchor - CSS: Cascading Style Sheets
the offset-anchor css property specifies the point inside the
box of an element travelling along an offset-path that is actually moving along the path.
... <position> a <position> defines an x/y coordinate, to place an item relative to the edges of an element's
box.
offset-position - CSS: Cascading Style Sheets
tion: 0 0; offset-position: 1cm 2cm; offset-position: 10ch 8em; /* edge offsets values */ offset-position: bottom 10px right 20px; offset-position: right 3em bottom 10px; offset-position: bottom 10px right; offset-position: top right 10px; /* global values */ offset-position: inherit; offset-position: initial; offset-position: unset; values auto the initial position is the position of the
box specified by the position property.
...a position defines an x/y coordinate, to place an item relative to the edges of an element's
box.
outline-style - CSS: Cascading Style Sheets
inset the outline makes the
box look as though it were embedded in the page.
... outset the opposite of inset: the outline makes the
box look as though it were coming out of the page.
text-combine-upright - CSS: Cascading Style Sheets
all attempts to typeset all consecutive characters within the
box horizontally, such that they take up the space of a single character within the vertical line of the
box.
... attempts to display a sequence of consecutive ascii digits (u+0030–u+0039) that has as many or fewer characters than the specified integer, such that it takes up the space of a single character within the vertical line
box.
text-indent - CSS: Cascading Style Sheets
horizontal spacing is with respect to the left (or right, for right-to-left layout) edge of the containing block-level element's content
box.
... recommendation the behavior with display: inline-block and anonymous block
boxes is explicitly defined.
perspective() - CSS: Cascading Style Sheets
10000100001000−1/d1 examples html <p>without perspective:</p> <div class="no-perspective-
box"> <div class="face front">a</div> <div class="face top">b</div> <div class="face left">c</div> </div> <p>with perspective (9cm):</p> <div class="perspective-
box-far"> <div class="face front">a</div> <div class="face top">b</div> <div class="face left">c</div> </div> <p>with perspective (4cm):</p> <div class="perspective-
box-closer"> <div class="face front">a</div> <div class="fa...
...ce top">b</div> <div class="face left">c</div> </div> css .face { position: absolute; width: 100px; height: 100px; line-height: 100px; font-size: 100px; text-align: center; } p + div { width: 100px; height: 100px; transform-style: preserve-3d; margin-left: 100px; } .no-perspective-
box { transform: rotatex(-15deg) rotatey(30deg); } .perspective-
box-far { transform: perspective(9cm) rotatex(-15deg) rotatey(30deg); } .perspective-
box-closer { transform: perspective(4cm) rotatex(-15deg) rotatey(30deg); } .top { background-color: skyblue; transform: rotatex(90deg) translate3d(0, 0, 50px); } .left { background-color: pink; transform: rotatey(-90deg) translate3d(0, 0, 50px); } .front { background-color: limegreen; transform: translate3d(0, 0, 50px); }...
translate() - CSS: Cascading Style Sheets
a percentage value refers to the width of the reference
box defined by the transform-
box property.
...a percentage as first value refers to the width, as second part to the height of the reference
box defined by the transform-
box property.
transform - CSS: Cascading Style Sheets
that is, all elements whose layout is governed by the css
box model except for: non-replaced inline
boxes, table-column
boxes, and table-column-group
boxes.
... find out more: mdn understanding wcag, guideline 2.3 explanations understanding success criterion 2.3.3 | w3c understanding wcag 2.1 formal definition initial valuenoneapplies totransformable elementsinheritednopercentagesrefer to the size of bounding
boxcomputed valueas specified, but with relative lengths converted into absolute lengthsanimation typea transformcreates stacking contextyes formal syntax none | <transform-list>where <transform-list> = <transform-function>+where <transform-function> = <matrix()> | <translate()> | <translatex()> | <translatey()> | <scale()> | <scalex()> | <scaley()> | <rotate()> | <skew()> | <skewx()> | <skewy()> |...
transition-timing-function - CSS: Cascading Style Sheets
t">ease-out</div> <div class="easeinout">ease-in-out</div> <div class="linear">linear</div> <div class="cb">cubic-bezier(0.2,-2,0.8,2)</div> </div> .parent {} .parent > div[class] { width: 12em; min-width: 12em; margin-bottom: 4px; background-color: black; border: 1px solid red; color: white; transition-property: all; transition-duration: 7s; } .parent > div.
box1{ width: 90vw; min-width: 24em; background-color: magenta; color: yellow; border: 1px solid orange; transition-property: all; transition-duration: 2s; } function updatetransition() { var els = document.queryselectorall(".parent > div[class]"); for(var c = els.length, i = 0; i < c; i++) { els[i].classlist.toggle("
box1"); } } var intervalid = window.setinte...
...mp-both">jump-both</div> <div class="jump-none">jump-none</div> <div class="step-start">step-start</div> <div class="step-end">step-end</div> </div> .parent {} .parent > div[class] { width: 12em; min-width: 12em; margin-bottom: 4px; background-color: black; border: 1px solid red; color: white; transition-property: all; transition-duration:7s; } .parent > div.
box1{ width: 90vw; min-width: 24em; background-color: magenta; color: yellow; border: 1px solid orange; transition-property: all; transition-duration:2s; } function updatetransition() { var els = document.queryselectorall(".parent > div[class]"); for(var c = els.length, i = 0; i < c; i++) { els[i].classlist.toggle("
box1"); } } var intervalid = window.setinter...
Event reference
storage events change (see non-standard events) storage update events checking downloading error noupdate obsolete updateready value change events broadcast check
boxstatechange hashchange input radiostatechange readystatechange valuechange uncategorized events invalid message message open show less common and non-standard events abortable fetch events event name fired when abort a dom request is aborted, i.e.
... check
boxstatechange xul the state of a check
box has been changed either by a user action or by a script (useful for accessibility).
Challenge solutions - Developer guides
solution add a rule to the body element (parent of the headings) to reset a new counter, and one to display and increment the counter on the headings: /* numbered headings */ body {counter-reset: headnum;} h3:before { content: "(" counter(headnum, upper-latin) ") "; counter-increment: headnum; }
boxes ocean border challenge add one rule to your stylesheet, making a wide border all around the oceans in a color that reminds you of the sea.
... solution the following rule achieves the desired result: h1:hover { color: blue; } javascript move
box to the right challenge change the script so that the square jumps to the right by 20 em when its color changes, and jumps back afterwards.
Creating and triggering events - Developer guides
// note: optionally, we've also leveraged the "function expression" (instead of the "arrow function expression") so "this" will represent the element this.dispatchevent(new customevent('awesome', { bubbles: true, detail: { text: () => textarea.value } })) }); triggering built-in events this example demonstrates simulating a click (that is programmatically generating a click event) on a check
box using dom methods.
... function simulateclick() { const event = new mouseevent('click', { view: window, bubbles: true, cancelable: true }); const cb = document.getelementbyid('check
box'); const cancelled = !cb.dispatchevent(event); if (cancelled) { // a handler called preventdefault.
HTML5 Parser - Developer guides
the parser case-corrects markup so <svg view
box='0 0 10 10'> works in html source.
... the dom methods and css selectors behave case-sensitively, so you need to write your dom calls and css selectors using the canonical case, which is camelcase for various parts of svg such as view
box.
Using HTML sections and outlines - Developer guides
html aside element (<aside>) defines a section that, though related to the main element, doesn't belong to the main flow, like an explanation
box or an advertisement.
...meaning a call out
box would not have a call-out
box inside.
disabled - HTML: Hypertext Markup Language
here are examples of a disabled check
box, radio button, <option> and <optgroup>, as well as some form controls that are disabled via the disabled attribute set on the ancestor <fieldset> element.
... <fieldset> <legend>check
boxes</legend> <p><label> <input type="check
box" name="ch
box" value="regular"> regular </label></p> <p><label> <input type="check
box" name="ch
box" value="disabled" disabled> disabled </label></p> </fieldset> <fieldset> <legend>radio buttons</legend> <p><label> <input type="radio" name="radio" value="regular"> regular </label></p> <p><label> <input type="radio" name="radio" value="disabled" disabled> disabled </label></p> </fieldset> <p> <label>select an option: <select> <optgroup label="group 1"> <option>option 1.1</option> </optgroup> <op...
HTML attribute: required - HTML: Hypertext Markup Language
the required attribute is supported by text, search, url, tel, email, password, date, month, week, time, datetime-local, number, check
box, radio, file, <input> types along with the <select> and <textarea> form control elements.
... in the case of a same named group of check
box input types, only the check
boxes with the required attribute are required.
<button>: The Button element - HTML: Hypertext Markup Language
implicit aria role button permitted aria roles check
box, link, menuitem, menuitemcheck
box, menuitemradio, option, radio, switch, tab dom interface htmlbuttonelement attributes this element's attributes include the global attributes.
... example <button name="favorite"> <svg aria-hidden="true" view
box="0 0 10 10"><path d="m7 9l5 8 3 9v6l1 4h3l1-3 1 3h3l7 6z"/></svg> add to favorites </button> if you want to visually hide the button's text, an accessible way to do so is to use a combination of css properties to remove it visually from the screen, but keep it parseable by assistive technology.
cx - SVG: Scalable Vector Graphics
three elements are using this attribute: <circle>, <ellipse>, and <radialgradient> html,body,svg { height:100% } <svg view
box="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <radialgradient cx="25%" id="mygradient"> <stop offset="0" stop-color="white" /> <stop offset="100%" stop-color="black" /> </radialgradient> <circle cx="50" cy="50" r="45"/> <ellipse cx="150" cy="50" rx="45" ry="25" /> <rect x="205" y="5" width="90" height="90" fill="url(#mygradient)" /> </svg> circle for <circle>, cx defines the x-axis coordinate of the center of the shape.
... value <length> default value 50% animatable yes example html,body,svg { height:100% } <svg view
box="0 0 34 10" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient cx="0" id="mygradient000"> <stop offset="0%" stop-color="gold" /> <stop offset="50%" stop-color="green" /> <stop offset="100%" stop-color="white" /> </radialgradient> <radialgradient cx="50%" id="mygradient050"> <stop offset="0%" stop-color="gold" /> <stop offset="50%" stop-co...
cy - SVG: Scalable Vector Graphics
three elements are using this attribute: <circle>, <ellipse>, and <radialgradient> html,body,svg { height:100% } <svg view
box="0 0 100 300" xmlns="http://www.w3.org/2000/svg"> <radialgradient cy="25%" id="mygradient"> <stop offset="0" stop-color="white" /> <stop offset="100%" stop-color="black" /> </radialgradient> <circle cy="50" cx="50" r="45"/> <ellipse cy="150" cx="50" rx="45" ry="25" /> <rect x="5" y="205" width="90" height="90" fill="url(#mygradient)" /> </svg> circle for <circle>, cy defines the y-axis coordinate of the center of the shape.
... value <length> default value 50% animatable yes example html,body,svg { height:100% } <svg view
box="0 0 34 10" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient cy="0" id="mygradient000"> <stop offset="0%" stop-color="gold" /> <stop offset="50%" stop-color="green" /> <stop offset="100%" stop-color="white" /> </radialgradient> <radialgradient cy="50%" id="mygradient050"> <stop offset="0%" stop-color="gold" /> <stop offset="50%" stop-co...
dx - SVG: Scalable Vector Graphics
seven elements are using this attribute: <altglyph>, <fedropshadow>, <feoffset>, <glyphref>, <text>, <tref>, and <tspan> html,body,svg { height:100% } <svg view
box="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- lines materialized the position of the glyphs --> <line x1="0" x2="100%" y1="50%" y2="50%" /> <line x1="10%" x2="10%" y1="0" y2="100%" /> <line x1="60%" x2="60%" y1="0" y2="100%" /> <!-- some reference text --> <text x="10%" y="50%" fill="grey">svg</text> <!-- the same text with a shift along the x-axis --> <text dx="50%" x="10%" y="50%">svg</text> </svg> line { stroke: red; stroke-width: .5px; stroke-dasharray: 3px; } altglyph warning: as ...
... value list of <length> default value none animatable yes example html,body,svg { height:100% } <svg view
box="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- lines materialized the position of the glyphs --> <line x1="0" x2="100%" y1="25%" y2="25%" /> <line x1="0" x2="100%" y1="50%" y2="50%" /> <line x1="0" x2="100%" y1="75%" y2="75%" /> <line x1="10%" x2="10%" y1="0" y2="100%" /> <line x1="30%" x2="30%" y1="0" y2="100%" /> <line x1="60%" x2="60%" y1="0" y2="100%" /> <!-...
dy - SVG: Scalable Vector Graphics
seven elements utilize this attribute: <altglyph>, <fedropshadow>, <feoffset>, <glyphref>, <text>, <tref>, and <tspan> html,body,svg { height:100% } <svg view
box="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <!-- lines materialized the position of the glyphs --> <line x1="10%" x2="10%" y1="0" y2="100%" /> <line x1="0" x2="100%" y1="30%" y2="30%" /> <line x1="0" x2="100%" y1="80%" y2="80%" /> <!-- some reference text --> <text x="10%" y="30%" fill="grey">svg</text> <!-- the same text with a shift along the y-axis --> <text dy="50%" x="10%" y="30%">svg</text> </svg> line { stroke: red; stroke-width: .5px; stroke-dasharray: 3px; } altglyph warning: a...
... value list of <length> default value none animatable yes example html,body,svg { height:100% } <svg view
box="0 0 150 100" xmlns="http://www.w3.org/2000/svg"> <!-- horizontal lines --> <line x1="0" x2="100%" y1="30" y2="30" /> <line x1="0" x2="100%" y1="40" y2="40" /> <line x1="0" x2="100%" y1="50" y2="50" /> <line x1="0" x2="100%" y1="60" y2="60" /> <!-- vertical lines --> <line x1="10" x2="10" y1="0" y2="100%" /> <line x1="50" x2="50" y1="0" y2="100%" /> <line x1="90" x2="90" y1="0"...
filterUnits - SVG: Scalable Vector Graphics
only one element is using this attribute: <filter> usage notes value userspaceonuse | objectbounding
box default value objectbounding
box animatable yes userspaceonuse x, y, width and height represent values in the current coordinate system that results from taking the current user coordinate system in place at the time when the <filter> element is referenced (i.e., the user coordinate system for the element referencing the <filter> element via a filter attribute).
... objectbounding
box in that case, x, y, width and height represent fractions or percentages of the bounding
box on the referencing element.
fr - SVG: Scalable Vector Graphics
only one element is using this attribute: <radialgradient> html, body, svg { height: 100%; } <svg view
box="0 0 480 200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient1" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="5%"> <stop offset="0%" stop-color="white"/> <stop offset="100%" stop-color="darkseagreen"/> </radialgradient> <radialgradient id="gradient2" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="25%"> <stop offset="0%" stop-color="white"/> <stop offset="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient1)" /> <circle cx="100" cy="100" r="100" f...
...ill="url(#gradient2)" style="transform: translatex(240px);" /> </svg> usage notes value <length> default value 0 animatable none example <svg view
box="0 0 120 120" width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="5%"> <stop offset="0%" stop-color="red"/> <stop offset="100%" stop-color="blue"/> </radialgradient> </defs> <rect x="10" y="10" rx="15" ry="15" width="100" height="100" fill="url(#gradient)" stroke="black" stroke-width="2"/> <circle cx="60" cy="60" r="50" fill="transparent" stroke="white" stroke-width="2"/> <circle cx="35" cy="35" r="2" fill="white" stroke="white"/> <circle cx="60" cy="60" r...
fx - SVG: Scalable Vector Graphics
only one element is using this attribute: <radialgradient> html, body, svg { height: 100%; } <svg view
box="0 0 480 200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient1" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="5%"> <stop offset="0%" stop-color="white"/> <stop offset="100%" stop-color="darkseagreen"/> </radialgradient> <radialgradient id="gradient2" cx="0.5" cy="0.5" r="0.5" fx="0.75" fy="0.35" fr="5%"> <stop offset="0%" stop-color="white"/> <stop offset="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient1)" /> <circle cx="100" cy="100" r...
... animatable none example <svg view
box="0 0 120 120" width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="5%"> <stop offset="0%" stop-color="red"/> <stop offset="100%" stop-color="blue"/> </radialgradient> </defs> <rect x="10" y="10" rx="15" ry="15" width="100" height="100" fill="url(#gradient)" stroke="black" stroke-width="2"/> <circle cx="60" cy="60" r="50" fill="transparent" stroke="...
fy - SVG: Scalable Vector Graphics
only one element is using this attribute: <radialgradient> html, body, svg { height: 100%; } <svg view
box="0 0 480 200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient1" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="5%"> <stop offset="0%" stop-color="white"/> <stop offset="100%" stop-color="darkseagreen"/> </radialgradient> <radialgradient id="gradient2" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.75" fr="5%"> <stop offset="0%" stop-color="white"/> <stop offset="100%" stop-color="darkseagreen"/> </radialgradient> </defs> <circle cx="100" cy="100" r="100" fill="url(#gradient1)" /> <circle cx="100" cy="100" r...
... animatable none example <svg view
box="0 0 120 120" width="200" height="200" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradient" cx="0.5" cy="0.5" r="0.5" fx="0.35" fy="0.35" fr="5%"> <stop offset="0%" stop-color="red"/> <stop offset="100%" stop-color="blue"/> </radialgradient> </defs> <rect x="10" y="10" rx="15" ry="15" width="100" height="100" fill="url(#gradient)" stroke="black" stroke-width="2"/> <circle cx="60" cy="60" r="50" fill="transparent" stroke="...
height - SVG: Scalable Vector Graphics
ute: <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <femorphology>, <feoffset>, <fespecularlighting>, <fetile>, <feturbulence>, <filter>, <foreignobject>, <image>, <mask>, <pattern>, <rect>, <svg>, and <use> html,body,svg { height:100% } <svg view
box="0 0 300 100" xmlns="http://www.w3.org/2000/svg"> <!-- with a height of 0 or less, nothing will be rendered --> <rect y="0" x="0" width="90" height="0"/> <rect y="0" x="100" width="90" height="60"/> <rect y="0" x="200" width="90" height="100%"/> </svg> feblend for <feblend>, height defines the vertical length for the rendering area of the primitive.
... note: in an html document if both the view
box and height attributes are omitted, the svg element will be rendered with a height of 150px value auto | <length> | <percentage> default value auto (treated as 100%) animatable yes note: starting with svg2, height is a geometry property meaning this attribute can also be used as a css property for <svg>.
href - SVG: Scalable Vector Graphics
fifteen elements are using this attribute: <a>, <animate>, <animatemotion>, <animatetransform>, <discard>, <feimage>, <image>, <lineargradient>, <mpath>, <pattern>, <radialgradient>, <script>, <set>, <textpath>, and <use> html, body, svg { height: 100%; } <svg view
box="0 0 160 40" xmlns="http://www.w3.org/2000/svg"> <a href="https://developer.mozilla.org/"><text x="10" y="25">mdn web docs</text></a> </svg> in svg a for <a>, href defines the location of the referenced object, expressed as a url reference.
... value <url> default value none animatable yes example html, body, svg { height: 100%; } <svg view
box="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <image href="/files/2917/fxlogo.png" x="0" y="0" height="100" width="100"/> </svg> lineargradient for <lineargradient>, href defines url referring to a template gradient element; to be valid, the reference must be to a different <lineargradient> or <radialgradient> element.
id - SVG: Scalable Vector Graphics
<svg width="120" height="120" view
box="0 0 120 120" xmlns="http://www.w3.org/2000/svg"> <style type="text/css"> <![cdata[ #smallrect { stroke: #000066; fill: #00cc00; } ]]> </style> <rect id="smallrect" x="10" y="10" width="100" height="100" /> </svg> usage notes value <id> default value none animatable no <id> specifies the element's id.
... note: you should avoid the use of id values that would be parsed as an svg view specification (e.g., mydrawing.svg#svgview(view
box(0,200,1000,1000))) or a basic media fragment when used as a url target fragment.
markerHeight - SVG: Scalable Vector Graphics
the markerheight attribute represents the height of the viewport into which the <marker> is to be fitted when it is rendered according to the view
box and preserveaspectratio attributes.
... relative values refer to the height specified via the view
box and preserveaspectratio attributes.
markerWidth - SVG: Scalable Vector Graphics
the markerwidth attribute represents the width of the viewport into which the <marker> is to be fitted when it is rendered according to the view
box and preserveaspectratio attributes.
... relative values refer to the width specified via the view
box and preserveaspectratio attributes.
numOctaves - SVG: Scalable Vector Graphics
only one element is using this attribute: <feturbulence> html, body, svg { height: 100%; } <svg view
box="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="noise1" x="0" y="0" width="100%" height="100%"> <feturbulence basefrequency="0.025" numoctaves="1" /> </filter> <filter id="noise2" x="0" y="0" width="100%" height="100%"> <feturbulence basefrequency="0.025" numoctaves="3" /> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url(#noise1);" /> <rec...
... example <svg width="200" height="200" view
box="0 0 220 220" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <feturbulence basefrequency="0.05" numoctaves="3" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment...
path - SVG: Scalable Vector Graphics
two elements are using this attribute: <animatemotion> and <textpath> html, body, svg { height: 100%; } <svg view
box="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <path id="mypath" fill="none" stroke="silver" d="m10,90 q90,90 90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50" /> <text> <textpath path="m10,90 q90,90 90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50"> quick brown fox jumps over the lazy dog.
...this means that the text within the <textpath> element does not render or contribute to the bounding
box of the <text> element.
pointer-events - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg view
box="0 0 20 10" xmlns="http://www.w3.org/2000/svg"> <!-- the circle will always intercept the mouse event.
...ill }) as a presentation attribute, it can be applied to any element but it is mostly relevant only on the following twenty-three elements: <a>, <circle>, <clippath>, <defs>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <marker>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <svg>, <switch>, <symbol>, <text>, <textpath>, <tspan>, <use> usage notes value bounding-
box | visiblepainted | visiblefill | visiblestroke | visible | painted | fill | stroke | all | none default value visiblepainted animatable yes for a detailed explanation of each possible value, have a look at the css pointer-events documentation.
primitiveUnits - SVG: Scalable Vector Graphics
only one element is using this attribute: <filter> usage notes value userspaceonuse | objectbounding
box default value userspaceonuse animatable yes userspaceonuse this value indicates that any length values within the filter definitions represent values in the current user coordinate system in place at the time when the <filter> element is referenced (i.e., the user coordinate system for the element referencing the <filter> element via a filter attribute).
... objectbounding
box this value indicates that any length values within the filter definitions represent fractions or percentages of the bounding
box on the referencing element.
seed - SVG: Scalable Vector Graphics
only one element is using this attribute: <feturbulence> html, body, svg { height: 100%; } <svg view
box="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="noise1" x="0" y="0" width="100%" height="100%"> <feturbulence basefrequency="0.025" seed="0" /> </filter> <filter id="noise2" x="0" y="0" width="100%" height="100%"> <feturbulence basefrequency="0.025" seed="100" /> </filter> <rect x="0" y="0" width="200" height="200" style="filter:url(#noise1);" /> <rect x="0" y="0" width="200" height="200" style="filter:url(#noise2); transform: translatex(220px);" /> </svg> usage notes value <number> default valu...
...e 0 animatable yes example <svg width="200" height="200" view
box="0 0 220 220" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <feturbulence basefrequency="0.05" seed="1000" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfilter)"/> </svg> specifications specification status comment filter effects module level 1the definition of 'seed' in that specification.
stroke-width - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it only has effect on shapes and text context elements, including: <altglyph>, <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, <rect>, <text>, <textpath>, <tref>, and <tspan> html,body,svg { height:100% } <svg view
box="0 0 30 10" xmlns="http://www.w3.org/2000/svg"> <!-- default stroke width: 1 --> <circle cx="5" cy="5" r="3" stroke="green" /> <!-- stroke width as a number --> <circle cx="15" cy="5" r="3" stroke="green" stroke-width="3" /> <!-- stroke width as a percentage --> <circle cx="25" cy="5" r="3" stroke="green" stroke-width="2%" /> </svg> usage notes valu...
...e <length> | <percentage> default value 1px animatable yes note: a percentage value is always computed as a percentage of the normalized view
box diagonal length.
width - SVG: Scalable Vector Graphics
ute: <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <femorphology>, <feoffset>, <fespecularlighting>, <fetile>, <feturbulence>, <filter>, <foreignobject>, <image>, <mask>, <pattern>, <rect>, <svg>, and <use> html,body,svg { height:100% } <svg view
box="0 0 100 300" xmlns="http://www.w3.org/2000/svg"> <!-- with a width of 0 or less, nothing will be rendered --> <rect x="0" y="0" width="0" height="90"/> <rect x="0" y="100" width="60" height="90"/> <rect x="0" y="200" width="100%" height="90"/> </svg> feblend for <feblend>, width defines the horizontal length for the rendering area of the primitive.
... note: in an html document if both the view
box and width attributes are omitted, the svg element will be rendered with a width of 300px value auto | <length> | <percentage> default value auto (treated as 100%) animatable yes note: starting with svg2, width is a geometry property meaning this attribute can also be used as a css property for <svg>.
SVG Attribute reference - SVG: Scalable Vector Graphics
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 b
box 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 ex...
... t tabindex tablevalues target targetx targety text-anchor text-decoration text-rendering textlength to transform transform-origin type u u1 u2 underline-position underline-thickness unicode unicode-bidi unicode-range units-per-em v v-alphabetic v-hanging v-ideographic v-mathematical values vector-effect version vert-adv-y vert-origin-x vert-origin-y view
box viewtarget visibility w width widths word-spacing writing-mode x x x-height x1 x2 xchannelselector xlink:actuate xlink:arcrole xlink:href xlink:role xlink:show xlink:title xlink:type xml:base xml:lang xml:space y y y1 y2 ychannelselector z z zoomandpan svg attributes by category generic attributes core attributes id, lang, tabindex, xml:base, xml:l...
<linearGradient> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg view
box="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <lineargradient id="mygradient" gradienttransform="rotate(90)"> <stop offset="5%" stop-color="gold" /> <stop offset="95%" stop-color="red" /> </lineargradient> </defs> <!-- using my linear gradient --> <circle cx="5" cy="5" r="4" fill="url('#mygradient')" /> </svg> attributes gradientunits this attribute defines the coordinate system fo...
...r attributes x1, x2, y1, y2 value type: userspaceonuse|objectbounding
box ; default value: objectbounding
box; animatable: yes gradienttransform this attribute provides additional transformation to the gradient coordinate system.
<marker> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg view
box="0 0 100 100" xmlns="http://www.w3.org/2000/svg"> <defs> <!-- arrowhead marker definition --> <marker id="arrow" view
box="0 0 10 10" refx="5" refy="5" markerwidth="6" markerheight="6" orient="auto-start-reverse"> <path d="m 0 0 l 10 5 l 0 10 z" /> </marker> <!-- simple dot marker definition --> <marker id="dot" view
box="0 0 10 10" refx="5" refy="5" markerwidth="5" markerheight="5"> <circle cx="5" cy="5" r="5" fill="red" /> </marker> ...
... value type: top|center|bottom|<coordinate> ; default value: 0; animatable: yes view
box this attribute defines the bound of the svg viewport for the current svg fragment.
<metadata> - SVG: Scalable Vector Graphics
example <svg width="400" view
box="0 0 400 300" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <metadata> <rdf:rdf xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:connect="http://www.w3.org/1999/08/29-svg-connections-in-rdf#"> <rdf:description about="#cablea"> <connect:ends rdf:resource="#socket1"/> <connect:ends rdf:resource="#computera"/> ...
...l 10 10 s 40 12 70 10 l 80 20z"/> </g> <g id="monitor"> <title>monitor</title> <desc>a very fancy monitor</desc> <rect width="160" height="120"/> <rect fill="lightgrey" width="138" height="95" x="11" y="12"/> </g> <g id="processor" transform="translate(0 142)"> <title>the computer</title> <desc>a desktop computer - broad flat
box style</desc> <rect width="160" height="60"/> <g id="discdrive" transform="translate(70 8)"> <title>disc drive</title> <desc>a built-in disc drive</desc> <rect width="58" height="3" x="12" y="8"/> <rect width="8" height="2" x="12" y="15"/> </g> <circle cx="135" cy="40" r="5"/> </g> </symbol> </defs> <text x="0"...
<radialGradient> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg view
box="0 0 10 10" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <radialgradient id="mygradient"> <stop offset="10%" stop-color="gold" /> <stop offset="95%" stop-color="red" /> </radialgradient> </defs> <!-- using my linear gradient --> <circle cx="5" cy="5" r="4" fill="url('#mygradient')" /> </svg> attributes cx this attribute defines the x coordinate of the end circle of the radial gradient.
... value type: <length> ; default value: same as cy; animatable: yes gradientunits this attribute defines the coordinate system for attributes x1, x2, y1, y2 value type: userspaceonuse|objectbounding
box ; default value: objectbounding
box; animatable: yes gradienttransform this attribute provides additional transformation to the gradient coordinate system.
<svg> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg view
box="0 0 300 100" xmlns="http://www.w3.org/2000/svg" stroke="red" fill="grey"> <circle cx="50" cy="50" r="40" /> <circle cx="150" cy="50" r="4" /> <svg view
box="0 0 10 10" x="200" width="100"> <circle cx="5" cy="5" r="4" /> </svg> </svg> attributes baseprofile deprecated since svg 2 the minimum svg language profile that the document requires.
... value type: <number> ; default value: none; animatable: no view
box the svg viewport coordinates for the current svg fragment.
<symbol> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg view
box="0 0 80 20" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <!-- our symbol in its own coordinate system --> <symbol id="mydot" width="10" height="10" view
box="0 0 2 2"> <circle cx="1" cy="1" r="1" /> </symbol> <!-- a grid to materialize our symbol positioning --> <path d="m0,10 h80 m10,0 v20 m25,0 v20 m40,0 v20 m55,0 v20 m70,0 v20" fill="none"...
... value type: <length>|<percentage>|top|center|bottom ; default value: 0; animatable: yes view
box this attribute defines the bound of the svg viewport for the current symbol.
<use> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg view
box="0 0 30 10" xmlns="http://www.w3.org/2000/svg"> <circle id="mycircle" cx="5" cy="5" r="4" stroke="blue"/> <use href="#mycircle" x="10" fill="blue"/> <use href="#mycircle" x="20" fill="white" stroke="red"/> <!-- stroke="red" will be ignored here, as stroke was already set on mycircle.
... value type: <length> ; default value: 0; animatable: yes note: width, and height have no effect on use elements, unless the element referenced has a view
box - i.e.
<view> - SVG: Scalable Vector Graphics
usage context categoriesnonepermitted contentany number of the following elements, in any order:descriptive elements attributes global attributes aria attributes » core attributes » global event attributes » externalresourcesrequired specific attributes view
box preserveaspectratio zoomandpan viewtarget example svg <svg width="600" height="200" view
box="0 0 600 200" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <defs> <radialgradient id="gradient"> <stop offset="0%" stop-color="#8cffa0" /> <stop offset="100%" stop-color="#8ca0ff" /> </radialgradient> </defs> <circle r="50" cx="180" cy="50" style="fill:url(#gradient)"/> <...
...view id="halfsizeview" view
box="0 0 1200 400"/> <view id="normalsizeview" view
box="0 0 600 200"/> <view id="doublesizeview" view
box="0 0 300 100"/> <a xlink:href="#halfsizeview"> <text x="5" y="20" font-size="20">half size</text> </a> <a xlink:href="#normalsizeview"> <text x="5" y="40" font-size="20">normal size</text> </a> <a xlink:href="#doublesizeview"> <text x="5" y="60" font-size="20">double size</text> </a> </svg> result dom interface this element implements the svgviewelement interface.
Basic Transformations - SVG: Scalable Vector Graphics
this way you can also simply create new coordinate systems by utilizing the view
box, width and height of the inner svg element.
... <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100" height="100"> <svg width="100" height="100" view
box="0 0 50 50"> <rect width="50" height="50" /> </svg> </svg> the example above has basically the same effect as the one above, namely that the rect will be twice as large as specified.
XUL accessibility tool - Archive of obsolete content
add the tool into the addons.mozilla.org review process go through the most useful/popular extensions with tool and fix a11y issues add checker to tinder
box so that bugs are caught at checkin time some or all of this work could be done through grants, and a likely person to oversee the grant deliverables and milestones would be mark finkle.
action - Archive of obsolete content
d, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), append...
assign - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
binding - Archive of obsolete content
inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appendc...
bindings - Archive of obsolete content
properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
broadcaster - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
broadcasterset - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
browser - Archive of obsolete content
currenturi, docshell, documentcharsetinfo, homepage, markupdocumentviewer, messagemanager, preferences, securityui, sessionhistory, webbrowserfind, webnavigation, webprogress methods addprogresslistener, goback, goforward, gohome, gotoindex, loaduri, loaduriwithflags, reload, reloadwithflags, removeprogresslistener, stop, swapdocshells examples <!-- shows mozilla homepage inside a group
box --> <group
box flex="1"> <caption label="mozilla homepage"/> <browser type="content" src="http://www.mozilla.org" flex="1"/> </group
box> attributes autocompleteenabled type: boolean set to true to enable autocomplete of fields.
column - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
columns - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
command - Archive of obsolete content
properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
commandset - Archive of obsolete content
properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
conditions - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
dropmarker - Archive of obsolete content
inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
grippy - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
key - Archive of obsolete content
properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
keyset - Archive of obsolete content
properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
member - Archive of obsolete content
inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
observes - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
page - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
param - Archive of obsolete content
type type: one of the values below the type of the parameter's value integer 32 bit integer int64 64 bit integer double double-precision floating-point number string string literal, the default value properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
popupset - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
preferences - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods void firechangedevent(in domelement preferenc...
query - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
queryset - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
row - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
rows - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
rule - Archive of obsolete content
properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
script - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
separator - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
stringbundleset - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
template - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
textnode - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
treechildren - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
treecols - Archive of obsolete content
inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
treeitem - Archive of obsolete content
properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
treerow - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
treeseparator - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
triple - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
where - Archive of obsolete content
, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods addeventlistener(), appen...
wizard - Archive of obsolete content
e="text/css"?> <wizard id="thewizard" title="secret code wizard" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script> function checkcode(){ document.getelementbyid('thewizard').canadvance = (document.getelementbyid('secretcode').value == "cabbage"); } </script> <wizardpage onpageshow="checkcode();"> <label value="enter the secret code:"/> <text
box id="secretcode" onkeyup="checkcode();"/> </wizardpage> <wizardpage> <label value="that is the correct secret code."/> </wizardpage> </wizard> attributes activetitlebarcolor type: color string specify background color of the window's titlebar when it is active (foreground).
wizardpage - Archive of obsolete content
inherited properties align, , allowevents, ,
boxobject, builder, , , , classname, , , , , collapsed, contextmenu, controllers, database, datasources, dir, , , flex, height, hidden, id, , , left, , maxheight, maxwidth, menu, minheight, minwidth, , , , , , , observes, ordinal, orient, , pack, , persist, , , , ref, resource, , , , , statustext, style, ,, tooltip, tooltiptext, top, width methods inherited methods ...
SVGFEConvolveMatrixElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><l...
SVGFEDiffuseLightingElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/>...
SVGFEDisplacementMapElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/>...
SVGFEDistantLightElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line ...
SVGFEDropShadowElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="...
SVGFEFloodElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="2...
SVGFEFuncAElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="2...
SVGFEFuncBElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="2...
SVGFEFuncGElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="2...
SVGFEFuncRElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="2...
SVGFEGaussianBlurElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line ...
SVGFEImageElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="2...
SVGFEMergeElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="121" y1="2...
SVGFEMergeNodeElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="12...
SVGFEMorphologyElement - Web APIs
<div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 23.333333333333332%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" view
box="-50 0 600 140" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/eventtarget" target="_top"><rect x="1" y="1" width="110" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="56" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">eventtarget</text></a><polyline points="111,25 121,20 121,30 111,25" stroke="#d4dde4" fill="none"/><line x1="...
r - SVG: Scalable Vector Graphics
two elements are using this attribute: <circle>, and <radialgradient> html,body,svg { height:100% } <svg view
box="0 0 300 200" xmlns="http://www.w3.org/2000/svg"> <radialgradient r="0" id="mygradient000"> <stop offset="0" stop-color="white" /> <stop offset="100%" stop-color="black" /> </radialgradient> <radialgradient r="50%" id="mygradient050"> <stop offset="0" stop-color="white" /> <stop offset="100%" stop-color="black" /> </radialgradient> <radialgradient r="100%" id="mygradient100"> <stop offset="0" stop-color="white" /> <stop offset="100%" stop-color="black" /> </radialgradient> <circle cx="50" cy="50" r="0"/> <circle cx="150" cy="50" r="25"/> <circle cx="250" cy="50" r="50"/> <...
repeatCount - SVG: Scalable Vector Graphics
five elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg view
box="0 0 220 150" xmlns="http://www.w3.org/2000/svg"> <rect x="0" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatcount="5"/> </rect> <rect x="120" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatcount="indefinite"/> </rect> </svg> usage notes value <number> | indefinite default value none animatable no <number> this value specifies the num...
repeatDur - SVG: Scalable Vector Graphics
five elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } <svg view
box="0 0 220 150" xmlns="http://www.w3.org/2000/svg"> <rect x="0" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatdur="5s"/> </rect> <rect x="120" y="0" width="100" height="100"> <animate attributetype="xml" attributename="y" from="0" to="50" dur="1s" repeatdur="indefinite"/> </rect> </svg> usage notes value <clock-value> | indefinite default values none animatable no <clock-value> this value specifies th...
requiredFeatures - SVG: Scalable Vector Graphics
s are using this attribute: <a>, <altglyph>, <animate>, <animatecolor>, <animatemotion>, <animatetransform>, <circle>, <clippath>, <cursor>, <defs>, <ellipse>, <foreignobject>, <g>, <image>, <line>, <mask>, <path>, <pattern>, <polygon>, <polyline>, <rect>, <set>, <svg>, <switch>, <text>, <textpath>, <tref>, <tspan>, <use> html, body, svg { height: 100%; } text { fill: white; } <svg view
box="0 0 250 45" xmlns="http://www.w3.org/2000/svg"> <g> <rect fill="forestgreen" x="10" y="10" height="25" width="230" /> <text x="20" y="27">requiredfeatures supported</text> </g> <g requiredfeatures=""> <rect fill="crimson" x="10" y="10" height="25" width="230" /> <text x="20" y="27">requiredfeatures not supported</text> </g> </svg> usage notes value <list-...
restart - SVG: Scalable Vector Graphics
five elements are using this attribute: <animate>, <animatecolor>, <animatemotion>, <animatetransform>, and <set> html, body, svg { height: 100%; } a { fill: blue; text-decoration: underline; cursor: pointer; } <svg view
box="0 0 220 200" xmlns="http://www.w3.org/2000/svg"> <rect y="30" width="100" height="100"> <animate attributetype="xml" attributename="y" from="30" to="100" dur="5s" repeatcount="1" restart="always" /> </rect> <rect x="120" y="30" width="100" height="100"> <animate attributetype="xml" attributename="y" from="30" to="100" dur="5s" repeatcount="1" restart="whennotactive"/> </rect> <a id="restart"><text y="20">restart animation</text></a> </svg> document.g...
result - SVG: Scalable Vector Graphics
seventeen elements are using this attribute: <feblend>, <fecolormatrix>, <fecomponenttransfer>, <fecomposite>, <feconvolvematrix>, <fediffuselighting>, <fedisplacementmap>, <fedropshadow>, <feflood>, <fegaussianblur>, <feimage>, <femerge>, <femorphology>, <feoffset>, <fespecularlighting>, <fetile>, and <feturbulence> html, body, svg { height: 100%; } <svg view
box="0 0 220 220" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter"> <feturbulence type="turbulence" basefrequency="0.05" numoctaves="2" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="50" xchannelselector="r" ychannelselector="g"/> </filter> <circle cx="100" cy="100" r="100" style="filter: url(#displacementfil...
rotate - SVG: Scalable Vector Graphics
examples svg <svg width="400" height="120" view
box="0 0 480 120" xmlns="http://www.w3.org/2000/svg"> <!-- draw the outline of the motion path in grey --> <path d="m10,110 a120,120 -45 0,1 110 10 a120,120 -45 0,1 10,110" stroke="lightgrey" stroke-width="2" fill="none" id="themotionpath"/> <!-- red arrow which will not rotate --> <path fill="red" d="m-5,-5 l10,0 -5,5 0,0 z"> <!-- define the motion path animation --> ...
rx - SVG: Scalable Vector Graphics
two elements are using this attribute: <ellipse>, and <rect> html,body,svg { height:100% } <svg view
box="0 0 300 200" xmlns="http://www.w3.org/2000/svg"> <ellipse cx="50" cy="50" rx="0" ry="25" /> <ellipse cx="150" cy="50" rx="25" ry="25" /> <ellipse cx="250" cy="50" rx="50" ry="25" /> <rect x="20" y="120" width="60" height="60" rx="0" ry="15"/> <rect x="120" y="120" width="60" height="60" rx="15" ry="15"/> <rect x="220" y="120" width="60" height="60" rx="150" ry="15"/> </svg> ellipse for <ellipse>, rx defines the x-radius of the shape.
ry - SVG: Scalable Vector Graphics
two elements are using this attribute: <ellipse>, and <rect> html,body,svg { height:100% } <svg view
box="0 0 300 200" xmlns="http://www.w3.org/2000/svg"> <ellipse cx="50" cy="50" ry="0" rx="25" /> <ellipse cx="150" cy="50" ry="25" rx="25" /> <ellipse cx="250" cy="50" ry="50" rx="25" /> <rect x="20" y="120" width="60" height="60" ry="0" rx="15"/> <rect x="120" y="120" width="60" height="60" ry="15" rx="15"/> <rect x="220" y="120" width="60" height="60" ry="150" rx="15"/> </svg> ellipse for <ellipse>, ry defines the y-radius of the shape.
scale - SVG: Scalable Vector Graphics
only one element is using this attribute: <fedisplacementmap> html, body, svg { height: 100%; } <svg view
box="0 0 480 220" xmlns="http://www.w3.org/2000/svg"> <filter id="displacementfilter" x="-20%" y="-20%" width="140%" height="140%"> <feturbulence type="turbulence" basefrequency="0.05" numoctaves="2" result="turbulence"/> <fedisplacementmap in2="turbulence" in="sourcegraphic" scale="5"/> </filter> <filter id="displacementfilter2" x="-20%" y="-20%" width="140%" height="140%"> <feturbulence type="turbulence" basefrequency="0.05" numoctaves...
shape-rendering - SVG: Scalable Vector Graphics
as a presentation attribute, it can be applied to any element but it has effect only on the following seven elements: <circle>, <ellipse>, <line>, <path>, <polygon>, <polyline>, and <rect> html, body, svg { height: 100%; } <svg view
box="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <circle cx="100" cy="100" r="100" shape-rendering="geometricprecision"/> <circle cx="320" cy="100" r="100" shape-rendering="crispedges"/> </svg> usage notes value auto | optimizespeed | crispedges | geometricprecision default value auto animatable yes auto this value indicates that the user ag...
side - SVG: Scalable Vector Graphics
only one element is using this attribute: <textpath> html, body, svg { height: 100%; } text { font: 25px arial, helvelica, sans-serif; } <svg view
box="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <text> <textpath href="#circle1" side="left">text left from the path</textpath> </text> <text> <textpath href="#circle2" side="right">text right from the path</textpath> </text> <circle id="circle1" cx="100" cy="100" r="70" fill="transparent" stroke="silver"/> <circle id="circle2" cx="320" cy="100" r="70" fill="transparent" stroke="silver"/> </svg> usage notes value left | right default value left animatable yes ...
specularConstant - SVG: Scalable Vector Graphics
only one element is using this attribute: <fespecularlighting> html, body, svg { height: 100%; } <svg view
box="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="specularlighting1" x="0" y="0" width="100%" height="100%"> <fespecularlighting in="sourcegraphic" specularconstant="1.2"> <fepointlight x="60" y="60" z="20" /> </fespecularlighting> </filter> <filter id="specularlighting2" x="0" y="0" width="100%" height="100%"> <fespecularlighting in="sourcegraphic" specularconstant="0.8"> <fepointlight x="60" y="60" z="20" /> </fespecularlighting> </fi...
specularExponent - SVG: Scalable Vector Graphics
two elements are using this attribute: <fespecularlighting> and <fespotlight> html, body, svg { height: 100%; } <svg view
box="0 0 420 200" xmlns="http://www.w3.org/2000/svg"> <filter id="diffuselighting1" x="0" y="0" width="100%" height="100%"> <fespecularlighting in="sourcegraphic" specularexponent="1"> <fepointlight x="60" y="60" z="20" /> </fespecularlighting> </filter> <filter id="diffuselighting2" x="0" y="0" width="100%" height="100%"> <fespecularlighting in="sourcegraphic" specularexponent="5"> <fepointlight x="60" y="60" z="20" /> </fespecularlighting> </filter> <rect x="0" y="0" width="200" height="200" style="filter: url...
startOffset - SVG: Scalable Vector Graphics
only one element is using this attribute: <textpath> html,body,svg { height:100% } <svg view
box="0 0 220 100" xmlns="http://www.w3.org/2000/svg"> <path id="path1" fill="none" stroke="red" d="m10,90 q90,90 90,45 q90,10 50,10 q10,10 10,40 q10,70 45,70 q70,70 75,50" /> <path id="path2" fill="none" stroke="red" d="m130,90 q210,90 210,45 q210,10 170,10 q130,10 130,40 q130,70 165,70 q190,70 195,50" /> <text> <textpath href="#path1" startoffset="0"> quick brown fox jumps over the lazy dog.