Ticket #4765 (closed Bug: fixed)

Opened 9 years ago

Last modified 5 years ago

ATCT should use plone css registry

Reported by: Anonymous User Owned by: spliter
Priority: minor Milestone: 2.5
Component: Templates/CSS Version:
Keywords: newbie Cc:

Description (last modified by hannosch) (diff)

The default ATCT included with plone 2.1 has a line tal:content="string:@import url($portal_url/atcontenttypes.css) in at least atct_album_view.

This is deprecated and is causing problems with custom stylesheets, and should be put in the css registry.

Change History

comment:1 Changed 9 years ago by davconvent

I don't think it's accurate to register a stylesheet with portal_css if it is used in only one template. The css_slot is still of normal use AFAIK. If atcontenttypes.css breaks other plone styles, then this is the one that should be fixed, not the template.

comment:2 Changed 8 years ago by hannosch

  • Component changed from Content Types to Visual and templates
  • Description modified (diff)
  • Milestone changed from Undecided to 2.5

comment:3 Changed 8 years ago by hannosch

  • Status changed from new to closed
  • Resolution set to invalid
  • Milestone changed from 2.5 to 2.1.2

Adding a single css file for one specialized template is done better in the template itself. Using RR for this would be overkill.

comment:4 Changed 8 years ago by deichi

  • Status changed from closed to reopened
  • Resolution invalid deleted

It is not overkill. The file is not obviously only used for one single template. If that is the case, it has at least to be renamed to something like atct_album.css or something. The problem with this is, that the file is included AFTER the RR slot. So it is IMPOSSIBLE to overwrite this file by any other means than commenting the whole thing out and move the code to ploneCustom.css or change the main template.

comment:5 Changed 8 years ago by limi

  • Keywords newbie added
  • Milestone changed from 2.1.2 to 2.1.3

Yup, we should investigate what CSS is actually used (very little after the album changes in 2.1.2, is my guess) and remove it altogether. The necessary rules should live in the Plone CSS.

comment:6 Changed 8 years ago by hannosch

  • Milestone changed from 2.1.3 to 2.1.x

comment:7 Changed 8 years ago by antonh@…

I'm going to look at this now (well over the weekend).

comment:8 Changed 8 years ago by antonh@…

All the classes in atcontenttypes.css are being used in atct_album_view, so they need to be kept.

comment:9 Changed 8 years ago by antonh@…

CMFPlone svn diff: Index: skins/plone_styles/public.css.dtml =================================================================== --- skins/plone_styles/public.css.dtml (revision 9473) +++ skins/plone_styles/public.css.dtml (working copy) @@ -1006,4 +1006,52 @@

border: 1px solid Black;

}

+/* Album view classes */ + +.photoAlbumEntry { + float: left; + height: 185px; + width: 143px; + margin: 0em; + padding: 0px 6px 0px 9px; + text-align: center; + background-image: url('&dtml-portal_url;/polaroid-single.png'); + background-repeat: no-repeat; +} + +.photoAlbumEntry img { + border: 1px solid #ccc; + display: block; + margin: 0 auto; +} + +.photoAlbumEntryWrapper { + /*display: block;*/ + height: 130px; + width: 128px; + margin-bottom: 7px; +} + +.photoAlbumEntry a { + display: block; + text-decoration: none; + font-size: &dtml-fontSmallSize;; + height: 169px; + width: 130px; + margin: 16px auto 0px; +} + +.photoAlbumFolder { + background-image: url('&dtml-portal_url;/polaroid-multi.png'); + background-repeat: no-repeat; +} + +.photoAlbumEntryTitle { + color: &dtml-discreetColor;; + display: block; + overflow: hidden; + width: 128px; + height: 3.6em; +} +

/* </dtml-with> */

comment:10 Changed 8 years ago by antonh@…

ATContentTypes svn diff:

Index: skins/ATContentTypes/atct_album_view.pt
===================================================================
--- skins/ATContentTypes/atct_album_view.pt     (revision 21876)
+++ skins/ATContentTypes/atct_album_view.pt     (working copy)
@@ -3,15 +3,6 @@
       metal:use-macro="here/main_template/macros/master"
       i18n:domain="plone">
 
-<head>
-
-    <metal:block fill-slot="css_slot">
-        <style type="text/css" media="screen"
-               tal:content="string:@import url($portal_url/atcontenttypes.css);"></style>
-    </metal:block>
-
-</head>
-
 <body>
 
 <div metal:fill-slot="main">

comment:11 Changed 8 years ago by antonh@…

Let's try that CMFPlone svn diff again:

Index: skins/plone_styles/public.css.dtml
===================================================================
--- skins/plone_styles/public.css.dtml  (revision 9473)
+++ skins/plone_styles/public.css.dtml  (working copy)
@@ -1006,4 +1006,52 @@
    border: 1px solid Black;
 }
 
+/* Album view classes */
+
+.photoAlbumEntry {
+    float: left;
+    height: 185px;
+    width: 143px;
+    margin: 0em;
+    padding: 0px 6px 0px 9px;
+    text-align: center;
+    background-image: url('&dtml-portal_url;/polaroid-single.png');
+    background-repeat: no-repeat;
+}
+
+.photoAlbumEntry img {
+    border: 1px solid #ccc;
+    display: block;
+    margin: 0 auto;
+}
+
+.photoAlbumEntryWrapper {
+    /*display: block;*/
+    height: 130px;
+    width: 128px;
+    margin-bottom: 7px;
+}
+
+.photoAlbumEntry a {
+    display: block;
+    text-decoration: none;
+    font-size: &dtml-fontSmallSize;;
+    height: 169px;
+    width: 130px;
+    margin: 16px auto 0px;
+}
+
+.photoAlbumFolder {
+    background-image: url('&dtml-portal_url;/polaroid-multi.png');
+    background-repeat: no-repeat;
+}
+
+.photoAlbumEntryTitle {
+    color: &dtml-discreetColor;;
+    display: block;
+    overflow: hidden;
+    width: 128px;
+    height: 3.6em;
+}
+
 /* </dtml-with> */

comment:12 Changed 8 years ago by hannosch

  • Status changed from reopened to new
  • Owner changed from to spliter
  • Milestone changed from 2.5.x to 2.1.x

comment:13 Changed 8 years ago by hannosch

  • Status changed from new to closed
  • Resolution set to fixed

(In [9756]) Moved css rules for the photo album view inside Plone's public.css, instead of having them inline in the template. This way they can be overridden. This closes #4765.

comment:14 Changed 8 years ago by hannosch

  • Milestone changed from 2.1.x to 2.5

comment:15 Changed 5 years ago by hannosch

  • Component changed from Visual and templates to Templates/CSS
Note: See TracTickets for help on using tickets.