Tinkerer themes stylesheets lack some of the original Sphinx css classes?

120 views
Skip to first unread message

basi...@gmail.com

unread,
Apr 3, 2013, 7:22:57 AM4/3/13
to tinker...@googlegroups.com
Recently tried adding an image with center alignment as follows:

.. image:: image.png
    :align: center

The css class that the image gerts is "align-center", which is defined in original Sphinxs' themes css, but is not found in Tinkerer themes :(

Christian Jann

unread,
Apr 3, 2013, 8:07:01 AM4/3/13
to tinker...@googlegroups.com
Have you tested the dark theme, dark.css contains this:

div.figure img {
border: 0;
vertical-align: middle;
max-width: 90%;
}

img.align-left, .figure.align-left, object.align-left {
clear: left;
float: left;
margin-right: 1em;
max-width: 90%;
}

img.align-right, .figure.align-right, object.align-right {
clear: right;
float: right;
margin-left: 1em;
max-width: 90%;
}

img.align-center, .figure.align-center, object.align-center {
display: block;
margin-left: auto;
margin-right: auto;
max-width: 90%;
}

.align-left {
text-align: left;
}

.align-center {
text-align: center;
}

.align-right {
text-align: right;
}


I have fixed it there for me, does adding this to your style sheet fix the
problem?

Maybe we should move this to the base boilerplate theme Vlad? max-width: 90%;
was also necessary to scale larger images on small screens.

Cheers,
chris

basi...@gmail.com

unread,
Apr 3, 2013, 8:12:08 AM4/3/13
to tinker...@googlegroups.com
Hi Christian,

Thanks for replying. Indeed, adding these classes to my custom theme (based on boilerplate) would fix the problem. Just wondering, whether the issue (absence of these in e.g. boilerplate) is a minor bug or a feature? :)

Vlad Riscutia

unread,
Apr 3, 2013, 11:37:52 AM4/3/13
to tinker...@googlegroups.com
Yeah, I believe it is a bug. This CSS should go in boilerplate. Feel free to open an issue on Bitbucket for this and I'll take a look.

Thank you,
Vlad


--
You received this message because you are subscribed to the Google Groups "tinkerer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tinkerer-dev...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Augustine Dunn

unread,
Apr 17, 2013, 2:17:36 AM4/17/13
to tinker...@googlegroups.com
Wondering if I am running into the same bug as the OP...



But first: I am having a GREAT time messing with my site.  Thanks to all that made it possible, especially Vlad.

I am running into some unexpected (by me: take that with grain of salt) behavior.  I would like to use some of the Sphinx "box directives" (my term) like

.. note:: this is text
.. warning:: this is text
.. seealso:: this is text

However I do not get the normal results as if I would in sphinx.  I get the result shown in the attached pic.

Do I have to retheme everything from sphinx that I want to use?  Is there a 'best' way to recover/inherit the default behavior of these directives?

Thanks.

Gus
tinkerer_box_directives.png

Augustine Dunn

unread,
Apr 17, 2013, 3:01:20 AM4/17/13
to tinker...@googlegroups.com
As a work around for the note/warning/etc I added the following text to the end of modern5.css_t:


/* Admonitions (copied from sphinx default theme) */
div.admonition p.admonition-title + p {
display: inline;
}

div.admonition p {
margin-bottom: 5px;
}

div.admonition pre {
margin-bottom: 5px;
}

div.admonition ul, div.admonition ol {
margin-bottom: 5px;
}

div.note {
background-color: #eee;
border: 1px solid #ccc;
}

div.seealso {
background-color: #ffc;
border: 1px solid #ff6;
}

div.topic {
background-color: #eee;
}

div.warning {
background-color: #ffe4e4;
border: 1px solid #f66;
}

p.admonition-title {
display: inline;
}

p.admonition-title:after {
content: ":";
}

Vlad Riscutia

unread,
Apr 17, 2013, 12:52:17 PM4/17/13
to tinker...@googlegroups.com
Yeah, I didn't bring over all CSS from Sphinx when I moved to HTML5 Boilerplate. There is a bug opened for this and I plan to look into it soon (actually I saw you commented on the bug, so you are aware of it). In the meantime, please use the workaround you described.

I'm glad you enjoy Tinkerer!

Thank you,
Vlad


--

W. Augustine Dunn III

unread,
Apr 17, 2013, 1:10:17 PM4/17/13
to tinker...@googlegroups.com
yes I commented then realized that this list was more the appropriate place to talk about user level workarounds so I moved the idea to here for others to read if need be.  


Sorry about the "noise"!  It was pretty late last night when I was working.

Gus


--
You received this message because you are subscribed to a topic in the Google Groups "tinkerer-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tinkerer-dev/Jzn7aplkA7o/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to tinkerer-dev...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
In science, "fact" can only mean "confirmed to such a degree that it would be perverse to withhold provisional assent." I suppose that apples might start to rise tomorrow, but the possibility does not merit equal time in physics classrooms.
-Stephen Jay Gould


Reply all
Reply to author
Forward
0 new messages