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

CSS between components & controllers #509

Closed
luxcem opened this issue Feb 3, 2014 · 2 comments
Closed

CSS between components & controllers #509

luxcem opened this issue Feb 3, 2014 · 2 comments
Assignees
Milestone

Comments

@luxcem
Copy link

luxcem commented Feb 3, 2014

I'm facing an issue with the list controller, trying to style it with thumbnail : http://ionicframework.com/docs/components/#item-thumbnails

<view title="'My List'">
  <content has-header="true" has-tabs="true">
    <list>
      <item ng-repeat="item in list" item-type="item item-thumbnail-left" href="#">
        <img class="item-image" ng-src="img/{{item.thumb}}" width="50">
        <h2>{{item.title}}</h2>
        <p>{{item.description}}</p>
      </item>
    </list>
  </content>
</view>

However the html produced is :

<div class="item item-complex ng-scope ng-isolate-scope item-thumbnail-left" ng-repeat="item in list" item-type="item item-thumbnail-left" href="#" style="">
    <a class="item-content" ng-href="#" ng-transclude="" href="#">
        <img class="item-image ng-scope" ng-src="img/something.jpeg" width="50" src="img/something.jpeg">
        <h2 class="ng-scope ng-binding">Something</h2>
        <p class="ng-scope ng-binding">Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
    </a>
</div>

Instead of

 <a class="item item-thumbnail-left" href="#">
      <img src="cover.jpg">
      <h2>Pretty Hate Machine</h2>
      <p>Nine Inch Nails</p>
    </a>

The css for thumbnail is :

.item-thumbnail-left {
  padding-left: 105px;
  min-height: 100px; }
  .item-thumbnail-left > img:first-child, .item-thumbnail-left > .item-image {
    position: absolute;
    top: 10px;
    left: 10px;
    max-width: 80px;
    max-height: 80px;
    width: 100%; }

But in that case img / .item-image is not a direct child of item-thumbnail-left.

@adamdbradley adamdbradley self-assigned this Feb 3, 2014
@adamdbradley
Copy link
Contributor

Thanks, I added in some fixes.

@adamdbradley adamdbradley added this to the 0.9.26 milestone Feb 23, 2014
@ionitron-bot
Copy link

ionitron-bot bot commented Sep 6, 2018

Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Sep 6, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants