Bug 20054: Remove attribute "text/css" for <style> element in OPAC
authorIndranil Das Gupta (L2C2 Technologies) <indradg@l2c2.co.in>
Sun, 21 Jan 2018 18:29:35 +0000 (23:59 +0530)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 12 Feb 2018 20:38:57 +0000 (17:38 -0300)
Conformance rules for HTML5 is generating warnings for <style> element
with type="text/css" attribute when the OPAC page is checked
with W3C Validator.

Test plan
=========

1/ Click the "Tag cloud" link on the OPAC. Paste the URL to your OPAC
   page (if it is hosted) to W3C Validator and watch the warning about
   type attribute "text/css".

2/ Apply patch and re-submit the page to the Validator. The warning
   will be gone.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: maksim <maksim@inlibro.com>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
12 files changed:
koha-tmpl/opac-tmpl/bootstrap/en/includes/doc-head-close.inc
koha-tmpl/opac-tmpl/bootstrap/en/modules/maintenance.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-full-serial-issues.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-idref.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-review.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-topissues.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/help.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt

index 838606e..e99db29 100644 (file)
 [% IF ( bidi ) %]
     <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/right-to-left_[% KOHA_VERSION %].css" />
 [% END %]
-[% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %]
+[% IF ( OPACUserCSS ) %]<style>[% OPACUserCSS %]</style>[% END %]
 [% IF SCO_login %]
     [% SET SCOUserCSS = Koha.Preference('SCOUserCSS') %]
     [% IF SCOUserCSS %]
-        <style type="text/css">[% SCOUserCSS %]</style>
+        <style>[% SCOUserCSS %]</style>
     [% END %]
 [% END %]
 <link rel="unapi-server" type="application/xml" title="unAPI" href="[% OPACBaseURL %]/cgi-bin/koha/unapi" />
index c4413a7..b7e0f75 100644 (file)
@@ -3,7 +3,7 @@
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% BLOCK cssinclude %]
-    <style type="text/css">
+    <style>
         #opac-maintenance-message {
             background:none repeat scroll 0 0 #FFFFFF;
             border:1px solid #A2A2A2;
index 383dea8..2350369 100644 (file)
@@ -5,7 +5,7 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your cart</title>
 [% INCLUDE 'doc-head-close.inc' %]
-[% BLOCK cssinclude %]<style type="text/css">.item-status { display: inline; }</style>[% END %]
+[% BLOCK cssinclude %]<style>.item-status { display: inline; }</style>[% END %]
 </head>
 [% INCLUDE 'bodytag.inc' bodyid='basket' %]
     <div class="main">
index 5e81d23..1631fa2 100644 (file)
@@ -5,7 +5,7 @@
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo;  Full subscription history for [% bibliotitle %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% BLOCK cssinclude %]
-    <style type="text/css">
+    <style>
         #search-facets fieldset { border: 0; margin: 0;padding:0;}#search-facets ol{padding:.3em;}#search-facets li {list-style-type:none;padding:4px 4px;}#search-facets label{font-weight:bold;display:block;margin:.2em 0;}#search-facets fieldset.action {padding-left:4px;margin:.3em;}div.tabsub { clear:both;}#subtabs a { display:block;float:left;border:1px solid #CCC;padding:.2em .4em;margin:.3em;text-decoration:none;font-size:115%;}#subtabs strong { display:block; float: left; font-size:115%;padding:.2em .4em; margin: 0.3em 0;}#subtabs { margin-top : 1em; }a.currentsubtab { background-color:#FFC;}
     </style>
 [% END %]
index 3d0d695..931e606 100644 (file)
@@ -3,7 +3,7 @@
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
 [% INCLUDE 'doc-head-close.inc' %]
 [% BLOCK cssinclude %]
-  <style type="text/css">
+  <style>
     ul.ui-tabs-nav li a, ul.ui-tabs-nav li span.a  { padding:0.6em 1em; }
     #idref h2.role {
         background-color: #DDDEEE;
index 5985b93..c89fb38 100644 (file)
@@ -3,7 +3,7 @@
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Images for: [% biblio.title |html %]</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% BLOCK cssinclude %]
-    <style type="text/css">
+    <style>
     #largeCoverImg {
         border : 1px solid #CCCCCC;
         display : block;
index 4647001..cf1ecd7 100644 (file)
@@ -4,7 +4,7 @@
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your checkout history</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% BLOCK cssinclude %]
-    <style type="text/css">ul.ui-tabs-nav li a, ul.ui-tabs-nav li span.a  { padding:0.6em 1em; }</style>
+    <style>ul.ui-tabs-nav li a, ul.ui-tabs-nav li span.a  { padding:0.6em 1em; }</style>
 [% END %]
 </head>
 [% INCLUDE 'bodytag.inc' bodyid='opac-readingrecord' %]
index 7e537b6..6e908a7 100644 (file)
@@ -1,6 +1,6 @@
 [% INCLUDE 'doc-head-open.inc' %]
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Comments on [% title |html %]</title>
-<style type="text/css">
+<style>
   #custom-doc { width:37.08em;*width:36.16em;min-width:485px; margin:1em auto; text-align:left; }
 </style>
 [% INCLUDE 'doc-head-close.inc' %]
index 4deb916..2c6bbc8 100644 (file)
@@ -5,7 +5,7 @@
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Tags</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% BLOCK cssinclude %]
-    <style type="text/css">
+    <style>
         fieldset { padding : .3em;margin:.3em 0;}
         #tagcloud    {background-color: #F3F3F3; text-align: justify;padding:7px;}
         .tag a       {text-decoration: none;}
index 09fa0e3..5f8ba00 100644 (file)
@@ -6,7 +6,7 @@
 <title>[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Most popular titles</title>
 [% INCLUDE 'doc-head-close.inc' %]
 [% BLOCK cssinclude %]
-    <style type="text/css">
+    <style>
         #search-facets fieldset { border: 0; margin: 0;padding:.3em;}#search-facets ol{padding:.3em;}#search-facets li {list-style-type:none;padding:4px 4px;}#search-facets label{font-weight:bold;display:block;margin:.2em 0;}#search-facets fieldset.action {padding-left:4px;margin:.3em;};
     </style>
 [% END %]
index c3fd4ff..8345453 100644 (file)
@@ -7,8 +7,8 @@
  <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/bootstrap/css/bootstrap.min_[% KOHA_VERSION %].css" />
 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/jquery/jquery-ui_[% KOHA_VERSION %].css" />
 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/sco_[% KOHA_VERSION %].css" />
-[% IF ( OPACUserCSS ) %]<style type="text/css">[% OPACUserCSS %]</style>[% END %]
-[% IF ( SCOUserCSS ) %]<style type="text/css">[% SCOUserCSS %]</style>[% END %]
+[% IF ( OPACUserCSS ) %]<style>[% OPACUserCSS %]</style>[% END %]
+[% IF ( SCOUserCSS ) %]<style>[% SCOUserCSS %]</style>[% END %]
 <!--[if lt IE 9]>
     <script src="[% interface %]/[% theme %]/lib/respond.min.js"></script>
 <![endif]-->
index cdbd52d..b0e9747 100644 (file)
@@ -9,8 +9,8 @@
 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/bootstrap/css/bootstrap.min_[% KOHA_VERSION %].css" />
 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/lib/jquery/jquery-ui_[% KOHA_VERSION %].css" />
 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/sco_[% KOHA_VERSION %].css" />
-[% IF ( Koha.Preference('OPACUserCSS') ) %]<style type="text/css">[% Koha.Preference('OPACUserCSS') %]</style>[% END %]
-[% IF ( Koha.Preference('SCOUserCSS') ) %]<style type="text/css">[% Koha.Preference('SCOUserCSS') %]</style>[% END %]
+[% IF ( Koha.Preference('OPACUserCSS') ) %]<style>[% Koha.Preference('OPACUserCSS') %]</style>[% END %]
+[% IF ( Koha.Preference('SCOUserCSS') ) %]<style>[% Koha.Preference('SCOUserCSS') %]</style>[% END %]
 <!--[if lt IE 9]>
     <script src="[% interface %]/[% theme %]/lib/respond.min.js"></script>
 <![endif]-->