XF 2.3 Some custom style questions?

philmckrackon

Well-known member
I am trying to replicate this gradient (old VB8.5 style).

grad1.webp

Is it possible in the admin >> appearance >> styles >> style properties >> ??
Or does it have to be done via CSS?
I drilled down to here.

grad2.webp
 
Possibly this, I haven't tested though.
TY for all the help (for me, PHP=Easy - CSS=WTF?). The above works but BOTH affect the complete page including widgets.
cccc1.webp

I am trying to just add gradient to the main body area.
I included this in extra.less but it removes all gradient from the complete page.
CSS:
[data-template="public:widget_trending_content"] {
    .block-container
    background: none;
}
 
TY for all the help (for me, PHP=Easy - CSS=WTF?). The above works but BOTH affect the complete page including widgets.

Make sure you are using .node-body, I think you've maybe put .block-body by mistake? The extra.less code should be

.node-body, .structItem.structItem--thread {
background: linear-gradient(180deg, #F8F7F1 45%, #ddd3ad 90%) no-repeat;
}
In know neither CSS or PHP 🤣
 
Just a FYI. Final code to duplicate the old VB style (just this part). I'll condense the code after I finish the style edits. Thanks. beerchug.gif

CSS:
// ********
// Add Gradient to Node & Thread Body
.node-body, .structItem.structItem--thread {
    background: linear-gradient(180deg, #F8F7F1 45%, #ddd3ad 90%) no-repeat;
}

// Change Node & Thread Links to Burgandy
.node-title a {
        color: rgb(135,8,7);
        text-decoration: none;
    }
.structItem-title a {
        color: rgb(135,8,7);
        text-decoration: none;
    }

// Change Node & Thread Hover to Orange
.node-title a:hover {
  color: rgb(232, 162, 75);
}
.structItem-title a:hover {
  color: rgb(232, 162, 75);
}
// *********
 
Last edited:
@Gemma or anyone...
Thoughts on using :not to exclude stickys? I would like to apply a different color. .structItemContainer-group--sticky .structItem

This is not working:
CSS:
// Add Gradient to Node & Thread Body Not Sticky
.node-body, .structItem.structItem--thread, :not .structItemContainer-group--sticky {
    background: linear-gradient(to bottom, #F8F7F1 45%, #ddd3ad 90%) no-repeat;
}
 
Last edited:
This is not working:
Try this, changing the sticky thread colour to suit.

CSS:
/* Add Gradient to Node and Thread Body Not Sticky */
.node-body {
    background: linear-gradient(to bottom, #f8f7f1 45%, #ddd3ad 90%) no-repeat;
}
/* Regular threads (non-sticky) */
.structItemContainer-group {
    &:not(.structItemContainer-group--sticky) {
        .structItem.structItem--thread {
            background: linear-gradient(to bottom, #f8f7f1 45%, #ddd3ad 90%) no-repeat;
        }
    }
}
/* Sticky threads */
.structItemContainer-group--sticky {
    .structItem.structItem--thread {
        background: linear-gradient(to bottom, #fff3d1 45%, #e2b764 90%) no-repeat;
    }
}
 
Last edited:
Try this, changing the sticky thread colour to suit.

CSS:
/* Add Gradient to Node and Thread Body Not Sticky */
.node-body {
    background: linear-gradient(to bottom, #f8f7f1 45%, #ddd3ad 90%) no-repeat;
}
/* Regular threads (non-sticky) */
.structItemContainer-group {
    &:not(.structItemContainer-group--sticky) {
        .structItem.structItem--thread {
            background: linear-gradient(to bottom, #f8f7f1 45%, #ddd3ad 90%) no-repeat;
        }
    }
}
/* Sticky threads */
.structItemContainer-group--sticky {
    .structItem.structItem--thread {
        background: linear-gradient(to bottom, #fff3d1 45%, #e2b764 90%) no-repeat;
    }
}
Thanks, stupid ampersand (&) got me!
 
Back
Top Bottom