€cdocutils.nodes document q)q}q(U nametypesq}q(Xcss-style-objectsqKXcss style objectsqNuUsubstitution_defsq}q Uparse_messagesq ]q Ucurrent_sourceq NU decorationq NUautofootnote_startqKUnameidsq}q(hUcss-style-objectsqhUid1quUchildrenq]q(cdocutils.nodes target q)q}q(U rawsourceqX.. _css-style-objects:qUparentqhUsourceqcdocutils.nodes reprunicode qXT/Data/Code/JavaScript/MathJax/Code/SourceForge/trunk/mathjax/docs/rst/CSS-styles.rstq…q}qbUtagnameq Utargetq!U attributesq"}q#(Uidsq$]q%Ubackrefsq&]q'Udupnamesq(]q)Uclassesq*]q+Unamesq,]q-Urefidq.huUlineq/KUdocumentq0hh]q1ubcdocutils.nodes section q2)q3}q4(hUhhhhUexpect_referenced_by_nameq5}q6hhsh Usectionq7h"}q8(h(]q9h*]q:h&]q;h$]q<(hheh,]q=(hheuh/Kh0hUexpect_referenced_by_idq>}q?hhsh]q@(cdocutils.nodes title qA)qB}qC(hXCSS Style ObjectsqDhh3hhh UtitleqEh"}qF(h(]qGh*]qHh&]qIh$]qJh,]qKuh/Kh0hh]qLcdocutils.nodes Text qMXCSS Style ObjectsqN…qO}qP(hhDhhBubaubcdocutils.nodes paragraph qQ)qR}qS(hX{Many MathJax components allow you to specify CSS styles that control the look of the elements they create. These are described using CSS style objects, which are JavaScript objects that represent standard CSS declarations. The main CSS style object is a collection of `name:value` pairs where the `name` is the CSS selector that is being defined, and the `value` is an object that gives the style for that selector. Most often, the selector will need to be enclosed in quotation marks, as it will contain special characters, so you would need to use ``"#myID"`` rather than just ``#myID`` and ``"ul li"`` rather than just ``ul li``.qThh3hhh U paragraphqUh"}qV(h(]qWh*]qXh&]qYh$]qZh,]q[uh/Kh0hh]q\(hMXMany MathJax components allow you to specify CSS styles that control the look of the elements they create. These are described using CSS style objects, which are JavaScript objects that represent standard CSS declarations. The main CSS style object is a collection of q]…q^}q_(hXMany MathJax components allow you to specify CSS styles that control the look of the elements they create. These are described using CSS style objects, which are JavaScript objects that represent standard CSS declarations. The main CSS style object is a collection of q`hhRubcdocutils.nodes title_reference qa)qb}qc(hX `name:value`qdh"}qe(h(]qfh*]qgh&]qhh$]qih,]qjuhhRh]qkhMX name:valueql…qm}qn(hUhhbubah Utitle_referenceqoubhMX pairs where the qp…qq}qr(hX pairs where the qshhRubha)qt}qu(hX`name`qvh"}qw(h(]qxh*]qyh&]qzh$]q{h,]q|uhhRh]q}hMXnameq~…q}q€(hUhhtubah houbhMX4 is the CSS selector that is being defined, and the q…q‚}qƒ(hX4 is the CSS selector that is being defined, and the q„hhRubha)q…}q†(hX`value`q‡h"}qˆ(h(]q‰h*]qŠh&]q‹h$]qŒh,]quhhRh]qŽhMXvalueq…q}q‘(hUhh…ubah houbhMX½ is an object that gives the style for that selector. Most often, the selector will need to be enclosed in quotation marks, as it will contain special characters, so you would need to use q’…q“}q”(hX½ is an object that gives the style for that selector. Most often, the selector will need to be enclosed in quotation marks, as it will contain special characters, so you would need to use q•hhRubcdocutils.nodes literal q–)q—}q˜(hX ``"#myID"``q™h"}qš(h(]q›h*]qœh&]qh$]qžh,]qŸuhhRh]q hMX"#myID"q¡…q¢}q£(hUhh—ubah Uliteralq¤ubhMX rather than just q¥…q¦}q§(hX rather than just q¨hhRubh–)q©}qª(hX ``#myID``q«h"}q¬(h(]q­h*]q®h&]q¯h$]q°h,]q±uhhRh]q²hMX#myIDq³…q´}qµ(hUhh©ubah h¤ubhMX and q¶…q·}q¸(hX and q¹hhRubh–)qº}q»(hX ``"ul li"``q¼h"}q½(h(]q¾h*]q¿h&]qÀh$]qÁh,]qÂuhhRh]qÃhMX"ul li"qÄ…qÅ}qÆ(hUhhºubah h¤ubhMX rather than just qÇ…qÈ}qÉ(hX rather than just qÊhhRubh–)qË}qÌ(hX ``ul li``qÍh"}qÎ(h(]qÏh*]qÐh&]qÑh$]qÒh,]qÓuhhRh]qÔhMXul liqÕ…qÖ}q×(hUhhËubah h¤ubhMX.…qØ}qÙ(hX.hhRubeubhQ)qÚ}qÛ(hXðThe value used to define the CSS style can either be a string containing the CSS definition, or a javascript object that is itself a collection of `name:value` pairs, where the `name` is the attribute being defined and `value` is the value that attibute should be given. Note that, since this is a JavaScript object, the pairs are separated by commas (not semi-colons) and the values are enclosed in quotation marks. If the name contains dashes, it should be enclosed in quotation marks as well.qÜhh3hhh hUh"}qÝ(h(]qÞh*]qßh&]qàh$]qáh,]qâuh/Kh0hh]qã(hMX“The value used to define the CSS style can either be a string containing the CSS definition, or a javascript object that is itself a collection of qä…qå}qæ(hX“The value used to define the CSS style can either be a string containing the CSS definition, or a javascript object that is itself a collection of qçhhÚubha)qè}qé(hX `name:value`qêh"}që(h(]qìh*]qíh&]qîh$]qïh,]qðuhhÚh]qñhMX name:valueqò…qó}qô(hUhhèubah houbhMX pairs, where the qõ…qö}q÷(hX pairs, where the qøhhÚubha)qù}qú(hX`name`qûh"}qü(h(]qýh*]qþh&]qÿh$]rh,]ruhhÚh]rhMXnamer…r}r(hUhhùubah houbhMX$ is the attribute being defined and r…r}r(hX$ is the attribute being defined and r hhÚubha)r }r (hX`value`r h"}r (h(]rh*]rh&]rh$]rh,]ruhhÚh]rhMXvaluer…r}r(hUhj ubah houbhMX is the value that attibute should be given. Note that, since this is a JavaScript object, the pairs are separated by commas (not semi-colons) and the values are enclosed in quotation marks. If the name contains dashes, it should be enclosed in quotation marks as well.r…r}r(hX is the value that attibute should be given. Note that, since this is a JavaScript object, the pairs are separated by commas (not semi-colons) and the values are enclosed in quotation marks. If the name contains dashes, it should be enclosed in quotation marks as well.rhhÚubeubhQ)r}r(hXRFor example, ``jax/output/HTML-CSS/config.js`` includes the following declaration:rhh3hhh hUh"}r(h(]rh*]r h&]r!h$]r"h,]r#uh/Kh0hh]r$(hMX For example, r%…r&}r'(hX For example, r(hjubh–)r)}r*(hX!``jax/output/HTML-CSS/config.js``r+h"}r,(h(]r-h*]r.h&]r/h$]r0h,]r1uhjh]r2hMXjax/output/HTML-CSS/config.jsr3…r4}r5(hUhj)ubah h¤ubhMX$ includes the following declaration:r6…r7}r8(hX$ includes the following declaration:r9hjubeubcdocutils.nodes literal_block r:)r;}r<(hXstyles: { ".MathJax .merror": { "background-color": "#FFFF88", color: "#CC0000", border: "1px solid #CC0000", padding: "1px 3px", "font-family": "serif", "font-style": "normal", "font-size": "90%" }, ".MathJax_Preview": {color: "#888888"}, }r=hh3hhh U literal_blockr>h"}r?(Ulinenosr@‰UlanguagerAX javascriptrBU xml:spacerCUpreserverDh$]rEh&]rFh(]rGh*]rHh,]rIuh/K/h0hh]rJhMXstyles: { ".MathJax .merror": { "background-color": "#FFFF88", color: "#CC0000", border: "1px solid #CC0000", padding: "1px 3px", "font-family": "serif", "font-style": "normal", "font-size": "90%" }, ".MathJax_Preview": {color: "#888888"}, }rK…rL}rM(hUhj;ubaubhQ)rN}rO(hXËThis defines two CSS styles, one for the selector ``.MathJax .merror``, which specifies a background color, foreground color, border, and so on, and a second for ``.MathJax_Preview`` that sets its color.rPhh3hhh hUh"}rQ(h(]rRh*]rSh&]rTh$]rUh,]rVuh/K0h0hh]rW(hMX2This defines two CSS styles, one for the selector rX…rY}rZ(hX2This defines two CSS styles, one for the selector r[hjNubh–)r\}r](hX``.MathJax .merror``r^h"}r_(h(]r`h*]rah&]rbh$]rch,]rduhjNh]rehMX.MathJax .merrorrf…rg}rh(hUhj\ubah h¤ubhMX\, which specifies a background color, foreground color, border, and so on, and a second for ri…rj}rk(hX\, which specifies a background color, foreground color, border, and so on, and a second for rlhjNubh–)rm}rn(hX``.MathJax_Preview``roh"}rp(h(]rqh*]rrh&]rsh$]rth,]ruuhjNh]rvhMX.MathJax_Previewrw…rx}ry(hUhjmubah h¤ubhMX that sets its color.rz…r{}r|(hX that sets its color.r}hjNubeubhQ)r~}r(hXžYou can add as many such definitions to a ``styles`` object as you wish. Note, however, that since this is a JavaScript object, the selectors must be unique (e.g., you can't use two definitions for ``"img"``, for example, as only the last one would be saved). If you need to use more than one entry for a single selector, you can add comments like ``/* 1 */`` and ``/* 2 */`` to the selector to make them unique.r€hh3hhh hUh"}r(h(]r‚h*]rƒh&]r„h$]r…h,]r†uh/K5h0hh]r‡(hMX*You can add as many such definitions to a rˆ…r‰}rŠ(hX*You can add as many such definitions to a r‹hj~ubh–)rŒ}r(hX ``styles``rŽh"}r(h(]rh*]r‘h&]r’h$]r“h,]r”uhj~h]r•hMXstylesr–…r—}r˜(hUhjŒubah h¤ubhMX“ object as you wish. Note, however, that since this is a JavaScript object, the selectors must be unique (e.g., you can't use two definitions for r™…rš}r›(hX“ object as you wish. Note, however, that since this is a JavaScript object, the selectors must be unique (e.g., you can't use two definitions for rœhj~ubh–)r}rž(hX ``"img"``rŸh"}r (h(]r¡h*]r¢h&]r£h$]r¤h,]r¥uhj~h]r¦hMX"img"r§…r¨}r©(hUhjubah h¤ubhMXŽ, for example, as only the last one would be saved). If you need to use more than one entry for a single selector, you can add comments like rª…r«}r¬(hXŽ, for example, as only the last one would be saved). If you need to use more than one entry for a single selector, you can add comments like r­hj~ubh–)r®}r¯(hX ``/* 1 */``r°h"}r±(h(]r²h*]r³h&]r´h$]rµh,]r¶uhj~h]r·hMX/* 1 */r¸…r¹}rº(hUhj®ubah h¤ubhMX and r»…r¼}r½(hX and r¾hj~ubh–)r¿}rÀ(hX ``/* 2 */``rÁh"}rÂ(h(]rÃh*]rÄh&]rÅh$]rÆh,]rÇuhj~h]rÈhMX/* 2 */rÉ…rÊ}rË(hUhj¿ubah h¤ubhMX% to the selector to make them unique.rÌ…rÍ}rÎ(hX% to the selector to make them unique.rÏhj~ubeubhQ)rÐ}rÑ(hXyIt is possible to include selectors like ``"@media print"``, in which case the value is a CSS style object. For example:rÒhh3hhh hUh"}rÓ(h(]rÔh*]rÕh&]rÖh$]r×h,]rØuh/K=h0hh]rÙ(hMX)It is possible to include selectors like rÚ…rÛ}rÜ(hX)It is possible to include selectors like rÝhjÐubh–)rÞ}rß(hX``"@media print"``ràh"}rá(h(]râh*]rãh&]räh$]råh,]ræuhjÐh]rçhMX"@media print"rè…ré}rê(hUhjÞubah h¤ubhMX>, in which case the value is a CSS style object. For example:rë…rì}rí(hX>, in which case the value is a CSS style object. For example:rîhjÐubeubj:)rï}rð(hXxstyles: { "@media print": { ".MathJax .merror": { "background-color": "white", border: 0 } } }rñhh3hhh j>h"}rò(j@‰jAX javascriptrójCjDh$]rôh&]rõh(]röh*]r÷h,]røuh/KJh0hh]rùhMXxstyles: { "@media print": { ".MathJax .merror": { "background-color": "white", border: 0 } } }rú…rû}rü(hUhjïubaubhQ)rý}rþ(hX?The various extensions and output processors include more examples of CSS style objects, so see the code for those files for additional samples. In particular, the ``extensions/MathMenu.js``, ``extensions/MathZoom.js``, ``extensions/FontWarnsing.js``, and ``jax/output/HTML-CSS/jax.js`` files include such definitions.rÿhh3hhh hUh"}r(h(]rh*]rh&]rh$]rh,]ruh/KKh0hh]r(hMX¥The various extensions and output processors include more examples of CSS style objects, so see the code for those files for additional samples. In particular, the r…r}r (hX¥The various extensions and output processors include more examples of CSS style objects, so see the code for those files for additional samples. In particular, the r hjýubh–)r }r (hX``extensions/MathMenu.js``r h"}r(h(]rh*]rh&]rh$]rh,]ruhjýh]rhMXextensions/MathMenu.jsr…r}r(hUhj ubah h¤ubhMX, r…r}r(hX, rhjýubh–)r}r(hX``extensions/MathZoom.js``rh"}r(h(]r h*]r!h&]r"h$]r#h,]r$uhjýh]r%hMXextensions/MathZoom.jsr&…r'}r((hUhjubah h¤ubhMX, r)…r*}r+(hX, r,hjýubh–)r-}r.(hX``extensions/FontWarnsing.js``r/h"}r0(h(]r1h*]r2h&]r3h$]r4h,]r5uhjýh]r6hMXextensions/FontWarnsing.jsr7…r8}r9(hUhj-ubah h¤ubhMX, and r:…r;}r<(hX, and r=hjýubh–)r>}r?(hX``jax/output/HTML-CSS/jax.js``r@h"}rA(h(]rBh*]rCh&]rDh$]rEh,]rFuhjýh]rGhMXjax/output/HTML-CSS/jax.jsrH…rI}rJ(hUhj>ubah h¤ubhMX files include such definitions.rK…rL}rM(hX files include such definitions.rNhjýubeubeubehUU transformerrONU footnote_refsrP}rQUrefnamesrR}rSUsymbol_footnotesrT]rUUautofootnote_refsrV]rWUsymbol_footnote_refsrX]rYU citationsrZ]r[h0hU current_liner\NUtransform_messagesr]]r^cdocutils.nodes system_message r_)r`}ra(hUh"}rb(h(]rcUlevelrdKh$]reh&]rfUsourcerghh*]rhh,]riUlinerjKUtyperkUINFOrluh]rmhQ)rn}ro(hUh"}rp(h(]rqh*]rrh&]rsh$]rth,]ruuhj`h]rvhMX7Hyperlink target "css-style-objects" is not referenced.rw…rx}ry(hUhjnubah hUubah Usystem_messagerzubaUreporterr{NUid_startr|KU autofootnotesr}]r~U citation_refsr}r€Uindirect_targetsr]r‚Usettingsrƒ(cdocutils.frontend Values r„or…}r†(Ufootnote_backlinksr‡KUrecord_dependenciesrˆNU rfc_base_urlr‰Uhttp://tools.ietf.org/html/rŠU tracebackr‹KUpep_referencesrŒNUstrip_commentsrNU toc_backlinksrŽUentryrU language_coderUenr‘U datestampr’NU report_levelr“KU _destinationr”NU halt_levelr•KU strip_classesr–NhENUerror_encoding_error_handlerr—Ubackslashreplacer˜Udebugr™NUembed_stylesheetrš‰Uoutput_encoding_error_handlerr›UstrictrœU sectnum_xformrKUdump_transformsržNU docinfo_xformrŸKUwarning_streamr NUpep_file_url_templater¡Upep-%04dr¢Uexit_status_levelr£KUconfigr¤NUstrict_visitorr¥NUcloak_email_addressesr¦ˆUtrim_footnote_reference_spacer§‰Uenvr¨NUdump_pseudo_xmlr©NUexpose_internalsrªNUsectsubtitle_xformr«‰U source_linkr¬NUrfc_referencesr­NUoutput_encodingr®Uutf-8r¯U source_urlr°NUinput_encodingr±U utf-8-sigr²U_disable_configr³NU id_prefixr´UU tab_widthrµKUerror_encodingr¶UUTF-8r·U_sourcer¸UT/Data/Code/JavaScript/MathJax/Code/SourceForge/trunk/mathjax/docs/rst/CSS-styles.rstr¹U generatorrºNUdump_internalsr»NU pep_base_urlr¼Uhttp://www.python.org/dev/peps/r½Uinput_encoding_error_handlerr¾jœUauto_id_prefixr¿UidrÀUdoctitle_xformrÁ‰Ustrip_elements_with_classesrÂNU _config_filesrÃ]rÄUfile_insertion_enabledrÅKU raw_enabledrÆKU dump_settingsrÇNubUsymbol_footnote_startrÈKUidsrÉ}rÊ(hh3hh3uUsubstitution_namesrË}rÌh h0h"}rÍ(h(]rÎh$]rÏh&]rÐUsourcerÑhh*]rÒh,]rÓuU footnotesrÔ]rÕUrefidsrÖ}r×h]rØhasub.