Skip to content

Commit

Permalink
Fix padding in aside
Browse files Browse the repository at this point in the history
  • Loading branch information
soyjavi committed Jun 16, 2013
1 parent dd77b66 commit 7d8d209
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 20 deletions.
3 changes: 2 additions & 1 deletion src/stylesheets/__init.styl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
HEADER_HEIGHT = 46px
HEADER_GROUPBAR_HEIGHT = 34px

ASIDE_WIDTH = 264px
ASIDE_WIDTH = 256px
ASIDE_PADDING = 8px
ASIDE_WIDTH_SMALL = 64px
ASIDE_SMALL_ICON = 48px

Expand Down
20 changes: 12 additions & 8 deletions src/stylesheets/lungo.animation.aside.styl
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
@import "__init.styl"
/**
* Stylesheet
*
* @namespace Lungo.Animation
* @class Aside
BOUNCE_DIST = 8
*
* @author Javier Jimenez Villar <[email protected]> || @soyjavi
*/

section
&[data-aside-left="show"]
Expand All @@ -24,26 +30,24 @@ aside

@keyframes sectionAsideLeftShow
from { transform translateX(0) }
60% { transform translateX(ASIDE_WIDTH + BOUNCE_DIST) }
60% { transform translateX(ASIDE_WIDTH + ASIDE_PADDING) }
to { transform translateX(ASIDE_WIDTH) }

@keyframes sectionAsideLeftHide
from { transform translateX(ASIDE_WIDTH) }
25% { transform translateX(ASIDE_WIDTH + BOUNCE_DIST) }
25% { transform translateX(ASIDE_WIDTH + ASIDE_PADDING) }
to { transform translateX(0) }

@keyframes sectionAsideRightShow
from { transform translateX(0) }
60% { transform translateX(-(ASIDE_WIDTH) - BOUNCE_DIST) }
60% { transform translateX(-(ASIDE_WIDTH) - ASIDE_PADDING) }
to { transform translateX(-(ASIDE_WIDTH)) }

@keyframes sectionAsideRightHide
from { transform translateX(-(ASIDE_WIDTH)) }
25% { transform translateX(-(ASIDE_WIDTH) - BOUNCE_DIST) }
25% { transform translateX(-(ASIDE_WIDTH) - ASIDE_PADDING) }
to { transform translateX(0) }

// =============================================

@keyframes asideLeftHide
from { transform translateX(0) }
to { transform translateX(-(ASIDE_WIDTH)) }
1 change: 0 additions & 1 deletion src/stylesheets/lungo.animation.phone.styl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ body[data-device="phone"] > section

OPACITY = 0.25
TRANSLATE = 110%

/* ------ SLIDE ------ */
DEGREES = -45deg
@keyframes phoneSlideOut
Expand Down
4 changes: 2 additions & 2 deletions src/stylesheets/lungo.layout.styl
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ body
& > .title
z-index: -1
float: left
// font-size: FONT_SIZE_BIG
font-size: 1.25em
font-size: 1.21em
box-flex(1)
&.centered
position: absolute
Expand Down Expand Up @@ -100,6 +99,7 @@ body
width: ASIDE_WIDTH
display: none
z-index: -1
border-right: solid ASIDE_PADDING transparent
& > header
& .title
margin: 0 INDENT
Expand Down
11 changes: 10 additions & 1 deletion src/stylesheets/lungo.media.phone.styl
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
@import "__init.styl"
/**
* Stylesheet
*
* @namespace Lungo.Media
* @class Phone
*
* @author Javier Jimenez Villar <[email protected]> || @soyjavi
*/


/* ==== Any phone ==== */
@media only screen and (max-width: 767px)
Expand Down
2 changes: 2 additions & 0 deletions src/stylesheets/lungo.widget.empty.styl
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ body > section > article > .empty
& > strong
font-size: FONT_SIZE_BIG
line-height: FONT_SIZE_BIG
& > small
font-size: FONT_SIZE_SMALL
& > button
margin: 0.5em 0
2 changes: 1 addition & 1 deletion src/stylesheets/theme/theme.layout.nav.styl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ nav
box-shadow inset 0 3px THEME

&[data-control=menu]
background-color: rgba(0,0,0,0.8)
background-color: rgba(0,0,0,0.9)
box-shadow 0 2px 0 SHADOW
&.icons
& > a
Expand Down
6 changes: 4 additions & 2 deletions src/stylesheets/theme/theme.layout.styl
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,18 @@ body > section
color: #fff

&.aside
box-shadow -4px 0 2px SHADOW
&:not(.right)
box-shadow -1px 0 8px SHADOW
&.right
box-shadow 2px 0 SHADOW
box-shadow 1px 0 8px SHADOW

&[data-pull] > article.active
box-shadow: 0 -1px 0 rgba(0,0,0,0.05)

body > aside
background-color: darken(ASIDE, 10%)
color: WHITE
border-right-color: darken(ASIDE, 10%)
& > header, & > footer
background-color: ASIDE

Expand Down
10 changes: 6 additions & 4 deletions src/stylesheets/theme/theme.widget.button.styl
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,14 @@

article
& .button, button
color: #fff !important
-webkit-font-smoothing: antialiased
border-radius BORDER_radius

box-shadow: inset 0 -1px rgba(0,0,0,0.1), 0 1px rgba(0,0,0,0.075)
text-shadow: 0 1px rgba(0,0,0,0.1)

&, & abbr
color: #fff
font-weight: 600
text-shadow: 0 1px rgba(0,0,0,0.1)
-webkit-font-smoothing: antialiased

&:hover
box-shadow: inset 0 0 5em rgba(0,0,0,0.1), inset 0 -1px rgba(0,0,0,0.15), 0 1px rgba(0,0,0,0.075)
Expand Down

0 comments on commit 7d8d209

Please sign in to comment.