fUrious
fUrious

Reputation: 444

How can I have different style for different slots?

In my app I have styles.css. Right now I'm setting up slots for the team where we have dev, test and production slots.

How can I have a different styles.css for dev, and another one for test? What I want to do is to simply have dev and test with another color in the top navigation indicating that this is not production (your in the wrong place - keep out coloring).

I've looked at application settings, but I don't know how I can enforce settings in .css files. Maybe the answer is a virtual directory, "overwriting" path to styles.css to a styles-dev.css in the dev slot? Does virtual directories stay with the slot when they are swapped?

Any other way to do this?

Upvotes: 0

Views: 71

Answers (1)

Scott Semyan
Scott Semyan

Reputation: 225

Typically, you want different slots to have the code that is ready to deploy by swapping slots. Thus you don't want files in there you don't want to deploy. If you want to color-code each slot, you could try one of the following:

  1. Use JavaScript to check the URL and color-code if you are using the slot URL
  2. Use server-side script to check for the presence of a variable and color-code based on that (different slots can have different settings, environment variables, etc.)

Upvotes: 1

Related Questions