Website Talk > CSS

Ordered css file for snews

(1/4) > >>

Sasha:
For all of you lazys.You cant have good cms if you have css file like shit.....This is how css looks like now in snews 1.6


 
--- Code: ---/*

sNews 1.6 Minimal Template

*/

*{ margin: 0; padding: 0; }*
body { font: .8em Arial, Sans-Serif; line-height: 1.8em; background: #fff; color: #444; }
a { color: #E23300; background: inherit; }
a:hover { color: #808080; background: inherit; }
h1 { color: #444; background: inherit; padding: 5px 0; }
h2 { border-bottom: 1px solid #eee; margin: 0 0 10px; padding: 0 0 3px; }
h3 { color: #808080; background: inherit; font-size: 1em; border-bottom: 1px solid #eee; margin: 0 0 10px; }
ul {  padding: 0; margin: 0 0 10px;}
li { list-style-type: none;}
p { margin: 5px 0 10px 0; }
#logo { float: left; margin: 0 0 15px; }

#menu { float: right; }
#menu li { float: left; }
#menu li a { margin: 0 0 0 35px; }
#menu li a.current { background: inherit; color: #444; }

#subheader { clear: both; padding: 8px 10px; height: 27px; line-height: 20px; margin: 0 0 25px 0; background: #eee; color: #808080; }
#subheader a { background: inherit; color: #444; }

#breadcrumbs { float: left; margin: 5px 0 0; }

#search { float: right; }
#search p { padding: 0; margin: 0; }

.wrap { margin: 30px auto; width: 94%; }
#left { float: left; width: 25%; }
#right { float: right; width: 70%; margin: 0 0 10px 0; }

#footer { clear: both; border-top: 1px solid #ccc; padding: 10px 5px; }
#rss { float: right; text-align: right; }
#rss li { float: left; margin: 0 0 0 10px; }

/* sNews */
fieldset { border: 1px solid #E4DF94; padding: 10px 8px; margin: 0 0 8px 0; background: #FFFBC0; color: #000; }
input { padding: 2px; }
textarea { width: 97%; height: 20em; padding: 3px; }
.comment { background: #F5F6F6; color: #808080; padding: 10px; margin: 0 0 10px 0; border-top: 1px solid #ccc; }
.commentsbox { background: #f4f4f4; color: #808080; padding: 10px; margin: 0 0 10px 0; }
.date { border-top: 1px solid #eee; margin: 0 0 20px 0; }
--- End code ---


and this is how need to looks like after two minutes of work..This is also easy to use and work around


--- Code: --- /* sNews 1.6 Minimal Template */



*{ margin: 0; padding: 0; }*


body {
      font: .8em Arial, Sans-Serif;
      line-height: 1.8em;
      background: #fff;
      color: #444;
}


a {
      color: #E23300;
      background: inherit;
}


a:hover {
      color: #808080;
      background: inherit;
}


h1 {
      color: #444;
      background: inherit;
      padding: 5px 0;
}


h2 {
      border-bottom: 1px solid #eee;
      margin: 0 0 10px;
      padding: 0 0 3px;
}


h3 {
      color: #808080;
      background: inherit;
      font-size: 1em;
      border-bottom: 1px solid #eee;
      margin: 0 0 10px;
}


ul { 
      padding: 0;
      margin: 0 0 10px;
}


li {
      list-style-type: none;
}


p {
      margin: 5px 0 10px 0;
}


#logo {
      float: left;
      margin: 0 0 15px;
}


#menu {
      float: right;
}


#menu li {
      float: left;
}


#menu li a {
      margin: 0 0 0 35px;
}


#menu li a.current {
      background: inherit;
      color: #444;
}



#subheader {
      clear: both;
      padding: 8px 10px;
      height: 27px;
      line-height: 20px;
      margin: 0 0 25px 0;
      background: #eee;
      color: #808080;
}


#subheader a {
      background: inherit;
      color: #444;
}


#breadcrumbs {
      float: left;
      margin: 5px 0 0;
}


#search {
      float: right;
}


#search p {
      padding: 0;
      margin: 0;
}


.wrap {
      margin: 30px auto;
      width: 94%;
}


#left {
      float: left;
      width: 25%;
}


#right {
      float: right;
      width: 70%;
      margin: 0 0 10px 0;
}


#footer {
      clear: both;
      border-top: 1px solid #ccc;
      padding: 10px 5px;
}


#rss {
     float: right;
     text-align: right;
}


#rss li {
     float: left;
     margin: 0 0 0 10px;
}




/* sNews */




fieldset {
      border: 1px solid #E4DF94;
      padding: 10px 8px;
      margin: 0 0 8px 0;
      background: #FFFBC0;
      color: #000;
}


input {
      padding: 2px;
}


textarea {
      width: 97%;
      height: 20em;
      padding: 3px;
}


.comment {
      background: #F5F6F6;
      color: #808080;
      padding: 10px;
      margin: 0 0 10px 0;
      border-top: 1px solid #ccc;
}


.commentsbox {
      background: #f4f4f4;
      color: #808080;
      padding: 10px;
      margin: 0 0 10px 0;
}


.date {
      border-top: 1px solid #eee;
      margin: 0 0 20px 0;
}
--- End code ---

Armen:
You've done nothing but just formatting it. That's all.
sNews' default template CSS was written by Luka and it's inline, compact, readable and valid. Coded by a pro.

http://www.cleancss.com/

This service will format CSS file any way you want it. If you like a hundred-line CSS file, fine.
But don't you dare call Luka's CSS-file shit.

You've done nothing, pal. Trust me.

funlw65:
" .. having it's format looking a little better, easy for working on ..."

I like both formats. I'm also a C programmer and you can choose to have your own style, or follow standards about formatting. If you keep code for you, then is OK. If you share it, then must be made "readable" by newbies. Sasha's format is more understandable but I don't see any wrong in Luka's code.

Your source Armen is good for translating compact and professional looking code in a more "newbie readable" format as Sasha mentioned.

Thank you both.

poppoll:
--Off topic--
Armen
Even "PRO's" like you make mistakes!
If the globe is your homepage than you have 45 xhtml errors and 191 warnings!
Not good coded I think.
PP

Sasha:
Armen this code formating is better then one with snews file you liked or not.Whay?Its easy to read and work on.I do not say Luka code is wrong but is hard to work for someone who try to learn.Luka is a great css coder but for this i do not agree with you.Code need to be simple and readable not matter if you pro or not.When you have cms you always,always need to think about other people not about you.cms snews is a public cms not your personal cms...you may use for personal but other people download script too.also i use that service cssclean but that service dont always work right .If you have opacity code with hack for ie mozila itd,itd service is useles... 

Navigation

[0] Message Index

[#] Next page

Go to full version