• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

Avoid custom CSS in admin

Scheduled Pinned Locked Moved NodeBB Plugins
1 Posts 1 Posters 165 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • magnusvhendinM Offline
    magnusvhendinM Offline
    magnusvhendin Swedes
    wrote on last edited by magnusvhendin
    #1

    In my plugin I write a lot of custom CSS (with LESS) and I do some overrides to speed things up (kind of tight deadline). one example is a custom btn-primary from bootstrap. I'm having a problem where this gets propagated into the admin view. I want to keep everything in the administration panel the way it is. Right now I'm solving it by doing this in my top LESS.file.

    body:not(.admin) {
      @import "buttons";
      @import "help";
      @import "login";
    }
    

    The problem I'm facing is that i can't do something like body { display: none; } in another file since it's a child of that first file. I need to either add the style at the top with no surrounding class (which of course creates a lint problem), or add a class to the very top, like so &.page-login { css }.

    Is there an easier way to just exclude admin from css?

    Thanks!

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development