[css] make ReST align statement works for images (closes #1280176)

authorKatia Saurfelt <katia.saurfelt@logilab.fr>
changeseta4338d00202d
branchstable
phasepublic
hiddenno
parent revision#dd222fcc85d3 [doc] cubicweb.view documentation (closes: #2099962)
child revision#9ad4d3efeb8e 3.14.8
files modified by this revision
web/data/cubicweb.css
web/data/cubicweb.old.css
# HG changeset patch
# User Katia Saurfelt <katia.saurfelt@logilab.fr>
# Date 1337766087 -7200
# Wed May 23 11:41:27 2012 +0200
# Branch stable
# Node ID a4338d00202d0b26e4f7c2628c48dae0b28afe33
# Parent dd222fcc85d331342b3529e68107a3b053301f80
[css] make ReST align statement works for images (closes #1280176)

diff --git a/web/data/cubicweb.css b/web/data/cubicweb.css
@@ -114,10 +114,11 @@
1    margin-left: 1.5em;
2  }
3 
4  img {
5    border: none;
6 +  display: block;
7  }
8 
9 
10  img.prevnext {
11    width: 22px;
@@ -218,13 +219,10 @@
12 
13  .legend{
14      font-style: italic;
15  }
16 
17 -.align-center{
18 -    text-align: center;
19 -}
20 
21  /***************************************/
22  /*   LAYOUT                            */
23  /***************************************/
24 
@@ -982,15 +980,21 @@
25  /********************************/
26  /* rest related classes         */
27  /********************************/
28 
29  img.align-right {
30 -  margin-left: 1.5em;
31 +  margin-left: auto;
32  }
33 
34  img.align-left {
35 -  margin-right: 1.5em;
36 +  margin-right: auto;
37 +}
38 +
39 +img.align-center{
40 +  text-align: center;
41 +  margin-left: auto;
42 +  margin-right: auto;
43  }
44 
45  /******************************/
46  /* reledit                    */
47  /******************************/
diff --git a/web/data/cubicweb.old.css b/web/data/cubicweb.old.css
@@ -62,13 +62,17 @@
48 
49  a:hover{
50    text-decoration: underline;
51  }
52 
53 -a img, img {
54 +a img{
55 +  text-align: center;
56 +}
57 +
58 +img{
59    border: none;
60 -  text-align: center;
61 +  display:block;
62  }
63 
64  img.prevnext {
65    width: 22px;
66    height: 22px;
@@ -214,29 +218,45 @@
67  .hidden {
68    display: none;
69    visibility: hidden;
70  }
71 
72 -li.invisible { list-style: none; background: none; padding: 0px 0px
73 -1px 1px; }
74 +li.invisible {
75 +  list-style: none;
76 +  background: none;
77 +  padding: 0px 0px 1px 1px;
78 +}
79 
80  li.invisible div {
81    display: inline;
82  }
83 
84  .caption {
85 -    font-weight: bold;
86 +  font-weight: bold;
87  }
88 
89  .legend{
90 -    font-style: italic;
91 +  font-style: italic;
92  }
93 
94 -.align-center{
95 -    text-align: center;
96 +/* rest related image classes generated with align: directive */
97 +
98 +img.align-right {
99 +  margin-left: auto;
100  }
101 
102 +img.align-left {
103 +  margin-right: auto;
104 +}
105 +
106 +img.align-center{
107 +  text-align: center;
108 +  margin-left: auto;
109 +  margin-right: auto;
110 +}
111 +
112 +
113  /***************************************/
114  /*   LAYOUT                            */
115  /***************************************/
116 
117  /* header */