Skip to content

Commit

Permalink
Mobile vs. desktop stylesheets
Browse files Browse the repository at this point in the history
- Separated common CSS into separate CSS file
- s/text-size/font-size/
- Mobile is 270% normal font size, desktop is 62.5%
  • Loading branch information
weierophinney committed Oct 18, 2010
1 parent f868569 commit 31b4e26
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 58 deletions.
5 changes: 3 additions & 2 deletions mobile-app/.vimproject
Expand Up @@ -201,10 +201,11 @@ mobile-app=/home/matthew/git/zf-examples/mobile-app CD=. filter="*.php *.phtml *
.htaccess
css=css {
960.css
reset.css
text.css
common.css
mobile-demo-desktop.css
mobile-demo-mobile.css
reset.css
text.css
}
}
tests=tests {
Expand Down
3 changes: 2 additions & 1 deletion mobile-app/application/layouts/scripts/layout.phtml
Expand Up @@ -4,7 +4,8 @@ $this->placeholder('sidebar')
->setPostfix('</ul>');
$this->headTitle('Mobile Device Demo')
->setSeparator(' - ');
$this->headLink()->prependStylesheet('/css/mobile-demo-desktop.css')
$this->headLink()->prependStylesheet('/css/common.css')
->prependStylesheet('/css/mobile-demo-desktop.css')
->prependStylesheet('/css/960.css')
->prependStylesheet('/css/text.css')
->prependStylesheet('/css/reset.css');
Expand Down
3 changes: 2 additions & 1 deletion mobile-app/application/layouts/scripts/mobile.phtml
Expand Up @@ -4,7 +4,8 @@ $this->placeholder('sidebar')
->setPostfix('</ul>');
$this->headTitle('Mobile Device Demo')
->setSeparator(' - ');
$this->headLink()->prependStylesheet('/css/mobile-demo-mobile.css')
$this->headLink()->prependStylesheet('/css/common.css')
->prependStylesheet('/css/mobile-demo-mobile.css')
->prependStylesheet('/css/960.css')
->prependStylesheet('/css/text.css')
->prependStylesheet('/css/reset.css');
Expand Down
49 changes: 49 additions & 0 deletions mobile-app/public/css/common.css
@@ -0,0 +1,49 @@
.application {
background-color: #000033;
}

.header, .content, .sidebar, .footer1, .footer2 {
background-color: #FFFFFF;
padding: 1em 0;
}

.spacer {
height: 1em;
}

.header h1 {
padding-left: 0.5em;
font-size: 3em;
}

.content {
overflow: auto;
}

.footer1, .footer2 {
text-align: center;
}

.content h2, .content p, .content dl {
margin-left: 0.5em;
margin-right: 0.5em;
}

dl dt {
font-weight: bold;
}

dl dt:after {
content: ":";
}

dl dd {
margin-left: 2em;
background-color: #FFCCFF;
border: 1px solid #003333;
padding: 0.5em;
}

.sidebar ul {
list-style-type: none;
}
52 changes: 1 addition & 51 deletions mobile-app/public/css/mobile-demo-desktop.css
@@ -1,53 +1,3 @@
body {
text-size: 62.5%;
}

.application {
background-color: #000033;
}

.header, .content, .sidebar, .footer1, .footer2 {
background-color: #FFFFFF;
padding: 1em 0;
}

.spacer {
height: 1em;
}

.header h1 {
padding-left: 0.5em;
text-size: 3em;
}

.content {
overflow: auto;
}

.footer1, .footer2 {
text-align: center;
}

.content h2, .content p, .content dl {
margin-left: 0.5em;
margin-right: 0.5em;
}

dl dt {
font-weight: bold;
}

dl dt:after {
content: ":";
}

dl dd {
margin-left: 2em;
background-color: #FFCCFF;
border: 1px solid #003333;
padding: 0.5em;
}

.sidebar ul {
list-style-type: none;
font-size: 62.5%;
}
4 changes: 1 addition & 3 deletions mobile-app/public/css/mobile-demo-mobile.css
@@ -1,5 +1,3 @@
@import url("/css/mobile-demo-desktop.css");

body {
text-size: 270%;
font-size: 270%;
}

0 comments on commit 31b4e26

Please sign in to comment.