Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't support Octopress Image Tag #18

Open
cdhunt opened this issue Jul 26, 2013 · 1 comment
Open

Doesn't support Octopress Image Tag #18

cdhunt opened this issue Jul 26, 2013 · 1 comment

Comments

@cdhunt
Copy link

cdhunt commented Jul 26, 2013

http://octopress.org/docs/plugins/image-tag/

Octopress uses left, right and center classes.

I added the following to \sass\custom\_layout.scss. I think that covers it.

article img, article video, .flash-video {
    -webkit-border-radius: 0.3em;
    -moz-border-radius: 0.3em;
    -ms-border-radius: 0.3em;
    -o-border-radius: 0.3em;
    border-radius: 0.3em;
    -webkit-box-shadow: rgba(0,0,0,0.15) 0 1px 4px;
    -moz-box-shadow: rgba(0,0,0,0.15) 0 1px 4px;
    box-shadow: rgba(0,0,0,0.15) 0 1px 4px;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
    border: #fff 0.5em solid;
    margin: auto;
}
article img.left    { float:left;margin-right:1.5em }
article img.right   { float:right;margin-left:1.5em }
article img.center  { display:block;margin:0 auto 1.5em }
@vasilakisfil
Copy link

Hmm I just re-solved the problem since there is already a solution here. Anyway what I did is to add in the very first lines of sass/base/_theme.scss file these (copied by classic theme):


.basic-alignment {
  &.left { float: left; margin-right: 1.5em; }
  &.right { float: right; margin-left: 1.5em; }
  &.center { display:block; margin: 0 auto 1.5em; }
  &.left, &.right { margin-bottom: .8em; }
}

@mixin shadow-box($border: #fff .5em solid, $shadow: rgba(#000, .15) 0 1px 4px, $border-radius: .3em) {
  @include border-radius($border-radius);
  @include box-shadow($shadow);
  @include box-sizing(border-box);
  border: $border;
}

and at the very end of the file these:


aside.sidebar {
  img, video, .flash-video {
    @extend .flex-content;
    @extend .basic-alignment;
    @include shadow-box;
  }
}

article {
  img, video, .flash-video {
    @extend .flex-content;
    @extend .basic-alignment;
    @include shadow-box;
  }
}


Hope it helps!

iveney added a commit to iveney/ivansiu.com that referenced this issue Apr 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants