Skip to content

CSS Help on my Flarum

Solved Customisation
5 2 1.4k
  • SO I really like the details plugin in and use it in a lot of my posts on my own flarum. To add drop downs for extra information or well placed affiliate links 😃

    FPEyph9.png

    I have some custom CSS so far:

    details {
    
        padding: .8em !important;
        background: #353535;
        border-radius: 20px;
        margin-bottom: .8em;
    }
    
    summary::-webkit-details-marker {display: none; }
    
    details summary::before { 
        content:"►"; 
        padding: .7em;
    }
    
    details[open] summary::before { 
        content:"▼"; 
        padding: .7em;
    }
    

    I am struggling with the CSS though and couldn’t figure one of my issues out while using inspect element on Google Chrome. When I open the details I get this line on the left side and cant figure out how to remove it:

    sdHCCsQ.png

    If you need to see it live, you can see the example from the picture above here.

  • SO I really like the details plugin in and use it in a lot of my posts on my own flarum. To add drop downs for extra information or well placed affiliate links 😃

    FPEyph9.png

    I have some custom CSS so far:

    details {
    
        padding: .8em !important;
        background: #353535;
        border-radius: 20px;
        margin-bottom: .8em;
    }
    
    summary::-webkit-details-marker {display: none; }
    
    details summary::before { 
        content:"►"; 
        padding: .7em;
    }
    
    details[open] summary::before { 
        content:"▼"; 
        padding: .7em;
    }
    

    I am struggling with the CSS though and couldn’t figure one of my issues out while using inspect element on Google Chrome. When I open the details I get this line on the left side and cant figure out how to remove it:

    sdHCCsQ.png

    If you need to see it live, you can see the example from the picture above here.

    @mike-jones Hey Mike - this CSS will fix that

    details>div {
        border-left: none;
    }
    

    Before

    f5d3f045-d571-4cb5-b51c-e8d2f0264573-image.png

    After

    abf773d1-0b39-4a00-b02e-e2fa3f822e14-image.png

  • @mike-jones Hey Mike - this CSS will fix that

    details>div {
        border-left: none;
    }
    

    Before

    f5d3f045-d571-4cb5-b51c-e8d2f0264573-image.png

    After

    abf773d1-0b39-4a00-b02e-e2fa3f822e14-image.png

    @phenomlab said in CSS Help on my Flarum:

    details>div {
    border-left: none;
    }

    Si I just added that and cleared my flarum and recache cache and it didn’t go away. Not sure what I am doing wrong.

  • So maybe not the right answer but I had to add

    !important
    

    to get it to work…

  • phenomlabundefined phenomlab has marked this topic as solved on
  • So maybe not the right answer but I had to add

    !important
    

    to get it to work…

    @mike-jones Yes, you’ll typically see this type of behaviour if there is another style that has higher priority in the sense that yours will be overridden. Using !important will override the higher preference, but should be used sparingly rather than everywhere.

  • phenomlabundefined phenomlab unlocked this topic on

Did this solution help you?
Did you find the suggested solution useful? Support 💗 Sudonix with a coffee
If your organisation needs deeper expertise around infrastructure, security, or technology leadership, learn more about Phenomlab Ltd. Many of the deeper technical guides behind Sudonix are published there.

Related Topics
  • Please help me, I can't install nodebb

    Locked Solved Customisation nodebb
    7
    5 Votes
    7 Posts
    925 Views
    Installation completed, verified, and tested. Correct installation methodology is below https://docs.nodebb.org/installing/os/ubuntu/
  • 3 Votes
    6 Posts
    2k Views
    @kadir-ay-0 marking as resolved based on https://community.nodebb.org/topic/17109/manual-build-a-night-mode-for-harmony/5 Please do not raise requests in two places - here and the NodeBB forums. All this does is create unnecessary load for both parties.
  • how to hide "moved" badge with CSS?

    Solved Customisation nodebb
    12
    1
    3 Votes
    12 Posts
    2k Views
    @crazycells ah, I see. That makes sense.
  • Quote design CSS

    Solved Customisation css quote
    15
    1
    4 Votes
    15 Posts
    3k Views
    @DownPW yes, that does make sense actually. I forgot to mention the layout of Sudonix is custom so that would have an impact on the positioning. Good spot
  • CSS codes for fa-info icon

    Solved Customisation nodebb
    9
    1
    6 Votes
    9 Posts
    2k Views
    I have just figured it out… it can be targeted with text-decoration-color: I was mistakenly using color
  • [NODEBB] Help for my custom CSS

    Solved Customisation nodebb css bugfix
    237
    49 Votes
    237 Posts
    81k Views
    @baris said: You should change your selectors so it doesn’t look at the entire document. You probably only want to apply fancybox to stuff inside the #content element which is what changes when the user navigates around the page. So use $('#content a').... for your selectors then the forum logo in the header won’t be selected. I modified the JS Fancybox code now and this code and it seem better // --------------------------------------------- // Fancybox Media Reader (Without Website Logo) // --------------------------------------------- if (top.location.pathname !== '/login') { $(window).on('action:posts.loaded', function(data) { console.log("Polling DOM for lazyLoaded images to apply Fancybox"); $(document).ready(function() { $('#content a').not('.forum-logo').not(".avatar").not(".emoji").not(".bmac-noanimate").each(function() { $('#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]').addClass("noanimate"); }); }); }); } if (top.location.pathname !== '/login') { $(document).ready(function() { $(window).on('action:ajaxify.end', function(data) { $('#content a').not('.logo').not(".avatar").not(".emoji").not(".bmac-noanimate").each(function() { $('#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]').addClass("noanimate"); data.preventDefault() // Strip out the images contained inside blockquotes as this looks nasty :) $('#content blockquote img').remove(); }); Fancybox.bind( '#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]', { groupAll: true, } ); }); }); } // Chat fancybox - fires when chat module loaded and AJAX calls new chat $(document).ready(function() { $(window).on('action:chat.loaded', function(data) { // >>> Se limiter au contenu principal uniquement <<< $('#content img').not('.forum-logo').not(".avatar").not(".emoji").not(".bmac-noanimate").each(function() { var newHref = $(this).attr("src"); $(this).wrap("<a class='fancybox' href='" + newHref + "'/>"); $('#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]').addClass("noanimate"); data.preventDefault(); // Strip out the images contained inside blockquotes as this looks nasty :) $('#content blockquote img').remove(); }); Fancybox.bind( '#content a[href*=".jpg"], #content a[href*=".jpeg"], #content a[href*=".png"], #content a[href*=".gif"], #content a[href*=".webp"]', { groupAll: true, } ); }); }); For the logo, I must use overflow: visible !important; on [component="brand/logo"] /* --- Logo --- */ [component="brand/logo"] { max-height: 50px; width: auto; height: auto; max-width: 100%; display: block; object-fit: contain; object-position: left center; overflow: visible !important; } Better result !!
  • Border Frame WYSIWYG CSS

    Solved Customisation css wysiwyg
    6
    1
    2 Votes
    6 Posts
    1k Views
    @DownPW just circling back to this, as I did eventually find the class. Seems you can disable the outline using the below CSS textarea { outline: none; }
  • [NODEBB] CSS Style Sheets SelectBox

    Locked Solved Customisation css
    112
    24 Votes
    112 Posts
    33k Views
    @DownPW as discussed in PM Seems to have been solved with the new JS code that you added allowing the version CSS file change!! Cache problem therefore with the JS of the Switcher theme Based on this, I will close this thread and reference https://sudonix.com/topic/207/nodebb-help-for-my-custom-css/27