Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7903781
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T09:50:07+00:00 2026-06-03T09:50:07+00:00

I run and actively develop a forum (which in itself runs on heavily modified

  • 0

I run and actively develop a forum (which in itself runs on heavily modified SMF 1.1.16) – one feature I would like to add is the ability for the user to pick custom colours (say 2-4) from a widget in the corner of the page to customize the colours of the forum.

The HTML output of the forum is structured such that modifying the colours can be done with pure CSS, and I’m wondering what the right way to insert this CSS is.

The idea I had was that once the user saves their colour information, a piece of javascript would generate the necessary CSS and save it using HTML5 localStorage (probably using a polyfill library). Then, on $(document).ready(), we check for this CSS being present and if it is, we inject it into the page head.

Is this approach sensible? It’s easy to develop, but will it result in a flicker of the usual styling (given that pages are rather heavyweight) before custom styling is applied?

If so, is there a better way to do this completely client-side? I would rather not involve the server if at all possible, but if I must I can just have the server generate CSS files for every user who saves custom styling.

What’s the best approach?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T09:50:08+00:00Added an answer on June 3, 2026 at 9:50 am

    I suggest you have a base style for the page first so that there won’t be FOUC. Then, have your JS load the custom styles, parse it, and apply it to the page afterwards. You could do a “fade-in change” (like fade in the background etc) so the styles won’t load like a snap.

    You could also blank the page first, like set the body to display:none, before you load the styles, then after the styles are applied, remove the display:none

    You also have to note that local storage has it’s size limit. Don’t load too much. Consider looking for the LZW compression in JS. It might help.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I run the following Gert's extract command to the data dump file which format
One of the things I've run across on Windows is when a web browser
I want to run light music (non-stop) when user is running my application actively.
I was wondering if anyone would have a better suggestion for keeping a feature
Here's our basic requirements: We have a base Rails application, which is being actively
I am going to host a website which is forum related (programmed in php
I run a script which calls another script through a ssh connection. My script
Normally when using VMWare Server 1.0.7 you are asked if you would like to
I run unsuccessfully in my .zshrc unalias rm rm() { mv $* /tmp/wastebasket }
I run several queries from mysql command line on my linux box (Fedora Os).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.