Jump to content

Page specific styles in default stylesheet


imperialized

Recommended Posts

I guess this would be more of an optimization and load time question more so than specific coding question. Anyhow, I was wondering how you all felt about including all styles in a style sheet.

 

For example, my login form will only be displayed on one page, so should I include that in my default stylesheet that is loaded on all pages or have page specific stylesheets for each page that contain those styles that are used solely on that page?

 

/* LOGIN  */

#login_container form{
    padding: 10px 25px;
}

#login_text {
	width: 200px;
    height: 40px;
border: 2px solid #E1EEF5;
background: #FFFFFF;
text-transform: lowercase;
font: bold 16px Arial, Helvetica, sans-serif;
color: #000000;
    border-radius: 5px;
    padding: 0px 10px 0px 10px;
    margin-bottom: 3px;   
} 

#login_text:hover{
    width: 200px;
    height: 40px;
border: 2px solid #2E9AFE;
background: #FFFFFF;
text-transform: lowercase;
font: bold 16px Arial, Helvetica, sans-serif;
color: #000000;
    border-radius: 5px;
    padding: 0px 10px 0px 10px;
    margin-bottom: 3px;
}

.login_submit {
    float: right;
    width: 100px;
    font-weight: bold;
    margin-left: auto;
    margin-right: auto;
}    

 

It seems unnecessary for the browser to read all of that if there is no login that will be displayed, what is your opinion on the matter?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.