diff options
author | Gordon P. Hemsley <me@gphemsley.org> | 2014-01-15 00:56:55 -0500 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2014-04-01 15:01:35 +0200 |
commit | 1c302e1cf2db02c4262bcb6501b337a2c9ea09fd (patch) | |
tree | d6ff84409276f4b4bdb817dd359e3e858ee35d94 | |
parent | 7f0731f461cbdd980c6b9312d60a515f29ae23d2 (diff) | |
download | shared-mime-info-1c302e1cf2db02c4262bcb6501b337a2c9ea09fd.tar.gz |
JavaScript and CSS are not subclasses of text/x-csrc
and add test files for CSS.
https://bugs.freedesktop.org/show_bug.cgi?id=73648
-rw-r--r-- | freedesktop.org.xml.in | 4 | ||||
-rw-r--r-- | tests/html4.css | 78 | ||||
-rw-r--r-- | tests/html5.css | 507 | ||||
-rw-r--r-- | tests/list | 4 |
4 files changed, 591 insertions, 2 deletions
diff --git a/freedesktop.org.xml.in b/freedesktop.org.xml.in index e9ac8c20..ccc36e4a 100644 --- a/freedesktop.org.xml.in +++ b/freedesktop.org.xml.in @@ -2175,7 +2175,7 @@ command to generate the output files. <_comment>JavaScript program</_comment> <alias type="application/x-javascript"/> <alias type="text/javascript"/> - <sub-class-of type="text/x-csrc"/> + <sub-class-of type="application/ecmascript"/> <generic-icon name="text-x-script"/> <glob pattern="*.js"/> <glob pattern="*.jsm"/> @@ -4927,7 +4927,7 @@ command to generate the output files. <_comment>CSS stylesheet</_comment> <acronym>CSS</acronym> <expanded-acronym>Cascading Style Sheets</expanded-acronym> - <sub-class-of type="text/x-csrc"/> + <sub-class-of type="text/plain"/> <glob pattern="*.css"/> <glob pattern="*.CSSL"/> </mime-type> diff --git a/tests/html4.css b/tests/html4.css new file mode 100644 index 00000000..451cb4af --- /dev/null +++ b/tests/html4.css @@ -0,0 +1,78 @@ +html, address, +blockquote, +body, dd, div, +dl, dt, fieldset, form, +frame, frameset, +h1, h2, h3, h4, +h5, h6, noframes, +ol, p, ul, center, +dir, hr, menu, pre { display: block; unicode-bidi: embed } +li { display: list-item } +head { display: none } +table { display: table } +tr { display: table-row } +thead { display: table-header-group } +tbody { display: table-row-group } +tfoot { display: table-footer-group } +col { display: table-column } +colgroup { display: table-column-group } +td, th { display: table-cell } +caption { display: table-caption } +th { font-weight: bolder; text-align: center } +caption { text-align: center } +body { margin: 8px } +h1 { font-size: 2em; margin: .67em 0 } +h2 { font-size: 1.5em; margin: .75em 0 } +h3 { font-size: 1.17em; margin: .83em 0 } +h4, p, +blockquote, ul, +fieldset, form, +ol, dl, dir, +menu { margin: 1.12em 0 } +h5 { font-size: .83em; margin: 1.5em 0 } +h6 { font-size: .75em; margin: 1.67em 0 } +h1, h2, h3, h4, +h5, h6, b, +strong { font-weight: bolder } +blockquote { margin-left: 40px; margin-right: 40px } +i, cite, em, +var, address { font-style: italic } +pre, tt, code, +kbd, samp { font-family: monospace } +pre { white-space: pre } +button, textarea, +input, select { display: inline-block } +big { font-size: 1.17em } +small, sub, sup { font-size: .83em } +sub { vertical-align: sub } +sup { vertical-align: super } +table { border-spacing: 2px; } +thead, tbody, +tfoot { vertical-align: middle } +td, th, tr { vertical-align: inherit } +s, strike, del { text-decoration: line-through } +hr { border: 1px inset } +ol, ul, dir, +menu, dd { margin-left: 40px } +ol { list-style-type: decimal } +ol ul, ul ol, +ul ul, ol ol { margin-top: 0; margin-bottom: 0 } +u, ins { text-decoration: underline } +br:before { content: "\A"; white-space: pre-line } +center { text-align: center } +:link, :visited { text-decoration: underline } +:focus { outline: thin dotted invert } + +/* Begin bidirectionality settings (do not change) */ +BDO[DIR="ltr"] { direction: ltr; unicode-bidi: bidi-override } +BDO[DIR="rtl"] { direction: rtl; unicode-bidi: bidi-override } + +*[DIR="ltr"] { direction: ltr; unicode-bidi: embed } +*[DIR="rtl"] { direction: rtl; unicode-bidi: embed } + +@media print { + h1 { page-break-before: always } + h1, h2, h3, + h4, h5, h6 { page-break-after: avoid } + ul, ol, dl { page-break-before: avoid } +} diff --git a/tests/html5.css b/tests/html5.css new file mode 100644 index 00000000..e58e78af --- /dev/null +++ b/tests/html5.css @@ -0,0 +1,507 @@ +/*----------------------------------------------------------------------------- + HTML5 Presentational Requirements and Recommendations Guide + Last Updated: 2012-02-06 + Reference: http://bit.ly/html5css + Based on: http://www.whatwg.org/specs/web-apps/current-work/multipage/rendering.html#the-css-user-agent-style-sheet-and-presentational-hints +-----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------- + Default values +-----------------------------------------------------------------------------*/ + +* { + background-attachment: scroll; + background-color: transparent; + background-image: none; + background-position: 0 0; + background-repeat: repeat; + border-color: #000; + border-style: none; + border-width: medium; + clear: none; + color: inherit; + content: normal; + cursor: inherit; + direction: ltr; + display: inline; + float: none; + font-size: inherit; + font-style: inherit; + font-variant: inherit; + font-weight: inherit; + height: auto; + line-height: normal; + list-style-type: disc; + margin: 0; + max-height: none; + max-width: none; + min-height: 0; + min-width: 0; + outline: invert none medium; + overflow: visible; + padding: 0; + text-align: left; + text-decoration: none; + unicode-bidi: inherit; + vertical-align: baseline; + visibility: inherit; + white-space: inherit; + width: auto; +} + +:rtl * { + direction: rtl; + text-align: right; +} + +html { + font-size: medium; + font-style: normal; + font-variant: normal; + font-weight: normal; + visibility: visible; + white-space: normal; +} + +/*----------------------------------------------------------------------------- + Display types +-----------------------------------------------------------------------------*/ + +[hidden], +audio:not([controls]), +area, +base, +command, +datalist, +head, +input[type=hidden], +link, +menu[type=context], +meta, +param, +rp, +script, +source, +style, +title { + display: none; +} + +:section, +:heading, +address, +article, +aside, +blockquote, +body, +dd, +details, +div, +dl, +dt, +figure, +figcaption, +footer, +form, +header, +hr, +html, +legend, +menu, +nav, +ol, +p, +pre, +summary, +ul { + display: block; +} + +audio[controls], +canvas, +img:complete, +video { + display: inline-block; +} + +li { + display: list-item; +} + +table { + display: table; +} + +caption { + display: table-caption; +} + +colgroup { + display: table-column-group; +} + +col { + display: table-column; +} + +thead { + display: table-header-group; +} + +tbody { + display: table-row-group; +} + +tfoot { + display: table-footer-group; +} + +tr { + display: table-row; +} + +td, +th { + display: table-cell; +} + +ruby { + display: ruby; +} + +rt { + display: ruby-text; +} + +/*----------------------------------------------------------------------------- + Margins and padding +-----------------------------------------------------------------------------*/ + +body { + margin: 8px; +} + +dl, +figure, +menu, +ol, +p, +pre, +ul { + margin: 1em 0; +} + +:any(dl, menu, ol, ul) :any(dl, menu, ul) { + margin: 0; +} + +blockquote { + margin: 1em 40px; +} + +menu, +ol, +ul { + padding: 0 0 0 40px; +} + +:rtl menu, +:rtl ol, +:rtl ul { + padding: 0 40px 0 0; +} + +fieldset { + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +dd { + margin: 0 0 0 40px; +} + +:rtl dd { + margin: 0 40px 0 0; +} + +h6, +:heading(6) { + margin: 2.33em 0; +} + +h5, +:heading(5) { + margin: 1.67em 0; +} + +h4, +:heading(4) { + margin: 1.33em 0; +} + +h3, +:heading(3) { + margin: 1em 0; +} + +h2, +:heading(2) { + margin: 0.83em 0; +} + +h1, +:heading(1) { + margin: 0.67em 0; +} + +th, +td { + padding: 1px; +} + +hr { + margin: 0.5em auto; +} + +/*----------------------------------------------------------------------------- + Alignment +-----------------------------------------------------------------------------*/ + +sub { + vertical-align: sub; +} + +sup { + vertical-align: super; +} + +thead, +tbody, +tfoot, +table > tr { + vertical-align: middle; +} + +tr, +td, +th { + vertical-align: inherit; +} + +caption, +th { + text-align: center; +} + +/*----------------------------------------------------------------------------- + Fonts and colors +-----------------------------------------------------------------------------*/ + +address, +cite, +dfn, +em, +i, +var { + font-style: italic; +} + +b, +strong, +th, +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: bold; +} + +small, +sub, +sup { + font-size: smaller; +} + +h6, +:heading(6) { + font-size: 0.67em; +} + +h5, +:heading(5) { + font-size: 0.83em; +} + +h4, +:heading(4) { + font-size: 1em; +} + +h3, +:heading(3) { + font-size: 1.17em; +} + +h2, +:heading(2) { + font-size: 1.5em; +} + +h1, +:heading(1) { + font-size: 2em; +} + +sub, +sup { + line-height: normal; +} + +code, +kbd, +pre, +samp { + font-family: monospace; +} + +:link { + color: #00F; +} + +:visited { + color: #800080; +} + +hr { + color: #808080; +} + +mark { + background-color: #FF0; + color: #000; +} + +/*----------------------------------------------------------------------------- + Punctuation and decorations +-----------------------------------------------------------------------------*/ + +[dir=ltr] { + direction: ltr; + unicode-bidi: embed; +} + +[dir=rtl] { + direction: rtl; + unicode-bidi: embed; +} + +bdo[dir=ltr], +bdo[dir=rtl] { + unicode-bidi: bidi-override; +} + +ol { + list-style-type: decimal; +} + +menu, +ul { + list-style-type: disc; +} + +:any(menu, ol, ul) :any(dl, menu, ul) { + list-style-type: circle; +} + +:any(menu, ol, ul) :any(menu, ol, ul) :any(dl, menu, ul) { + list-style-type: square; +} + +abbr[title] { + text-decoration: dotted underline; +} + +del, +s { + text-decoration: line-through; +} + +:link, +:visited, +ins, +u { + text-decoration: underline; +} + +pre { + white-space: pre; +} + +fieldset { + border: groove 2px ThreeDFace; +} + +hr { + border-style: inset; + border-width: 1px; +} + +table { + border-collapse: separate; + border-spacing: 2px; + border-style: outset; +} + +table, +td, +th { + border-color: #808080; +} + +thead, +tbody, +tfoot, +tr { + border-color: inherit; +} + +td, +th { + border-style: inset; +} + +q:before { + content: open-quote; +} + +q:after { + content: close-quote; +} + +/*----------------------------------------------------------------------------- + Media +-----------------------------------------------------------------------------*/ + +audio[controls] { + height: 1em; +} + +iframe { + border: 2px inset; +} + +/*----------------------------------------------------------------------------- + Block inheritance +-----------------------------------------------------------------------------*/ + +table { + font-size: initial; + font-style: initial; + font-variant: initial; + font-weight: initial; + line-height: initial; + text-align: initial; + white-space: initial; +}
\ No newline at end of file @@ -249,6 +249,10 @@ test.d text/x-dsrc ox test.v text/x-verilog ox test.sv text/x-svsrc ox test.svh text/x-svhdr ox +# Copied from http://www.w3.org/TR/CSS21/sample.html +html4.css text/css ox +# Copied from http://www.iecss.com/whatwg.css +html5.css text/css ox # Copied from http://www.w3.org/TR/html5/offline.html#manifests test.manifest text/cache-manifest test.yaml application/x-yaml |