Post by Matte on Mar 28, 2023 23:50:57 GMT -8
Kami
Ok, so I've got my news bar back to a manageable state. The only weird thing I'm running into now is that the height of the news bar changes depending on whether I have the "slide" animation or the "flip" animation selected. The slide animation yields a shorter bar, the flip animation yields a taller bar. This occurs whether there is a single line of text or enough text that it wraps to a second line. Almost like there's a difference in padding. Is this normal? Is there a fix for this?
EDIT: I found out that the slide transition is a different class than the flip transition (flip seems to be the default). I added 3px padding to the top and bottom as follows and it works for when there is only one line of text.
A new problem now, only when choosing the slide transition. In a situation where I have two separate news items to display, one of them being a single line of text and the other being long enough to wrap to a second line, the padding is thrown off again. It looks like it has about 3px of extra padding on the bottom now, moving the single line of text up. And on the news item that wraps to a second line, the first line gets cut off prior to wrapping.
Example:
News feed text:
The Discord is now on the home page of our forum, drop in and leave a comment! No need to have a Discord account, you can chat as a guest!
What displays in the news feed with the slide animation chosen:
The Discord is now on the home page of our forum, drop in and leave a comment! No need to have a Discord account, you
as a guest!
The words "can chat" extend past the end of the news feed box so they're cut off. This only happens when choosing the slide transition. Any tips? Is my CSS just butchered?
You can see the current problem at the test forum: matte.boards.net/
Ok, so I've got my news bar back to a manageable state. The only weird thing I'm running into now is that the height of the news bar changes depending on whether I have the "slide" animation or the "flip" animation selected. The slide animation yields a shorter bar, the flip animation yields a taller bar. This occurs whether there is a single line of text or enough text that it wraps to a second line. Almost like there's a difference in padding. Is this normal? Is there a fix for this?
EDIT: I found out that the slide transition is a different class than the flip transition (flip seems to be the default). I added 3px padding to the top and bottom as follows and it works for when there is only one line of text.
#news .items .itemSlide { padding: 3px 10px; }
A new problem now, only when choosing the slide transition. In a situation where I have two separate news items to display, one of them being a single line of text and the other being long enough to wrap to a second line, the padding is thrown off again. It looks like it has about 3px of extra padding on the bottom now, moving the single line of text up. And on the news item that wraps to a second line, the first line gets cut off prior to wrapping.
Example:
News feed text:
The Discord is now on the home page of our forum, drop in and leave a comment! No need to have a Discord account, you can chat as a guest!
What displays in the news feed with the slide animation chosen:
The Discord is now on the home page of our forum, drop in and leave a comment! No need to have a Discord account, you
as a guest!
The words "can chat" extend past the end of the news feed box so they're cut off. This only happens when choosing the slide transition. Any tips? Is my CSS just butchered?
/* News Bar */
#news { color: @nav_tree_color; font: @nav_tree_font; text-decoration: @nav_tree_decoration; z-index: 9; height: 22px; background-color: @nav_tree_background_color; overflow: hidden; margin: 0 auto 10px; border: @nav_tree_border_width @nav_tree_border_style @nav_tree_border_color; .rounded-corners(@nav_tree_border_radius); }
#news .items { height: 22px; position: relative; overflow: hidden;}
#news .items > div > div {font-size: 100%; padding: 0px 10px; text-align:justify; line-height: 22px; }
#news .items a {font-weight: bold;}
#news .items div img { vertical-align: text-bottom; }
#news .items .itemSlide { padding: 3px 10px; }
#news .nav { background-color: #3f3f3f; float: left; background-position: center; }
#news .nav > span { width: auto !important; border-width: 0px 0px 0px 0px; border-style: solid; border-color: transparent; cursor: default; float: left; display: inline-block; padding: 0px 3px; height: 22px; }
#news .nav > span.title { font-size: 130%; color: #ffffff; text-align: center; display: inline-block; height: 22px; padding: 0px 10px; line-height: 22px;}
#news .nav .arrow.left { .rounded-corners(@nav_tree_border_radius, 0, 0, @nav_tree_border_radius); padding-left:15px; }
#news .nav .arrow.right { padding-right:15px; }
#news .nav .arrow.left span { border-right-color: #ffffff; }
#news .nav .arrow.right span { border-left-color: #ffffff; }
#news .nav .arrow.left:hover { border-right: 0px solid #3f3f3f; background-color: #333333; }
#news .nav .arrow.right:hover { border-right: 0px solid #3f3f3f; border-left: 1px solid #3f3f3f; margin-left: -1px; background-color: #333333; }
/* #news .nav:hover { background-color: @nav_tree_hover_background_color; } */
/* #news .nav:hover > span { border: @nav_tree_border_width @nav_tree_border_style @nav_tree_border_color; border-width: 0px @nav_tree_border_width 0px 0px; } */
You can see the current problem at the test forum: matte.boards.net/