Happy New Year!!!!!
This has been bugging me for awhile. Can we get classes for entry images without comments?
What I am thinking of is something comparable to serendipity_imageComment_center (plus left and right) in serendipity_editor.js. Maybe serendipity_imageNoComment_center ????
In addition, I would love to see the elimination of all inline styles for all these images, or at least some option to disable them. !important will suffice for now in css if that is not possible due to BC.
I would also like to see this in the 1.2 branch, not just 1.3.
We can get around this with general img styling for entries, then specifically styling imageComments and entry icons, but that is clumsy IMHO.
Opinions?
Classes for entry images without comments
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Classes for entry images without comments
Hi!
When someone doesn't want a comment, they don't need a wrapping div, so the s9y image manager inserts none.
I want to keep the image insertion HTML code to a minimum, because else it might look odd to people who add it to their raw HTML, if s9y swamps them with too many HTML attributes.
I could add a CSS class to the <img> container, though? <img ... class="s9y_image"> ?
Best regards,
Garvin
When someone doesn't want a comment, they don't need a wrapping div, so the s9y image manager inserts none.
I want to keep the image insertion HTML code to a minimum, because else it might look odd to people who add it to their raw HTML, if s9y swamps them with too many HTML attributes.
I could add a CSS class to the <img> container, though? <img ... class="s9y_image"> ?
I don't think this could be done in a BC way. When removing the styles, people would all need to update their CSS styles so that it shows properly again.In addition, I would love to see the elimination of all inline styles for all these images, or at least some option to disable them. !important will suffice for now in css if that is not possible due to BC.
I'm actually not planning on releasing another 1.2 point release.I would also like to see this in the 1.2 branch, not just 1.3.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Classes for entry images without comments
Personally, I would prefer the extra markup for the sole reason of making it consistent with images that contain comments (I often favor consistency over purity). However, I can live with img class="serendipity_imageNoComment" PROVIDED it is also appended with the same positioning attributes used for comments (ie, left, right, center, etc) which is important for setting margins and padding, among other things. It could also set the stage for a possible future elimination of the current inline styles, such as float: right.garvinhicking wrote:I could add a CSS class to the <img> container, though? <img ... class="s9y_image"> ?
Yeah, I was afraid BC might be a problem here. At some point in the future, s9y will need to be willing to turn its back on BC!!! Seems like we are justifying some bad habits/markup/code in the name of BC.I don't think this could be done in a BC way. When removing the styles, people would all need to update their CSS styles so that it shows properly again.In addition, I would love to see the elimination of all inline styles for all these images, or at least some option to disable them. !important will suffice for now in css if that is not possible due to BC.
=Don=
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Classes for entry images without comments
Hi!
class = "image"
class = "image_left"
class = "image_right"
I'm hugely against breaking things which are not necessary, and can already be achieved with different approaches, like in this case the "!important" and CSS class selector override.
Best regards,
Garvin
That would be doable. I'd prefer short terms though, likeHowever, I can live with img class="serendipity_imageNoComment" PROVIDED it is also appended with the same positioning attributes used for comments (ie, left, right, center, etc) which is important for setting margins and padding, among other things. It could also set the stage for a possible future elimination of the current inline styles, such as float: right.
class = "image"
class = "image_left"
class = "image_right"
I'm always in favor of breaking BC, where it provides an actual benefit that couldn'T be done otherwise.At some point in the future, s9y will need to be willing to turn its back on BC!!!
I'm hugely against breaking things which are not necessary, and can already be achieved with different approaches, like in this case the "!important" and CSS class selector override.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
Re: Classes for entry images without comments
The comment versions are:garvinhicking wrote: That would be doable. I'd prefer short terms though, like
class = "image"
class = "image_left"
class = "image_right"
class="serendipity_imageComment_center"
class="serendipity_imageComment_left"
class="serendipity_imageComment_right"
If you want to drop the leading "serendipity", perhaps a bit of consistency would be to add "center" to your first suggestion, so perhaps this?:
class = "image_center"
class = "image_left"
class = "image_right"
Personally, I think it should be preceeded with serendipity simply because a) the comment version is, and b) so are entry icons (img.serendipity_entryIcon).... but again, that's my personal opinion regarding consistency.
Inline styles can be overridden (I do it all the time), I have been speaking from a position of removing presentation from markup when/wherever possible.I'm hugely against breaking things which are not necessary, and can already be achieved with different approaches, like in this case the "!important" and CSS class selector override.
=Don=
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Re: Classes for entry images without comments
Hi!
It's done
Regards,
Garvin
It's done
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
Actually, "center" is "noposition". We have no "center" position, only thre positions:
unfloated, left, right.
Regards,
Garvin
Actually, "center" is "noposition". We have no "center" position, only thre positions:
unfloated, left, right.
Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
-
- Regular
- Posts: 3652
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi!
And a new image would needed to be created to indicate that formatting.
I'm all for it, but I don't have the time to do this.
Best regards,
Garvin
That would mean adding a fourth formatting option to the media popup, and adding inline styles to the output, so that it also works with old templates?Don Chambers wrote:Yeah, but many/most stylesheets that style .serendipity_imageComment_center, for instance, will do so in a way that centers the image... which is why I thought perhaps a 4th class should be available that designers do NOT feel compelled to style "centered".
And a new image would needed to be created to indicate that formatting.
I'm all for it, but I don't have the time to do this.
Best regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/