Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

feat(pagination): add classes to assist with styling #4142

Closed
wants to merge 1 commit into from

Conversation

wesleycho
Copy link
Contributor

  • Add classes to allow the user to target the styles of component with more specificity

Closes #4130

@icfantv
Copy link
Contributor

icfantv commented Aug 7, 2015

👍

<li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}"><a href ng-click="selectPage(page + 1, $event)">{{::getText('next')}}</a></li>
<li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}"><a href ng-click="selectPage(totalPages, $event)">{{::getText('last')}}</a></li>
<li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)">{{::getText('first')}}</a></li>
<li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}"><a href ng-click="selectPage(page - 1, $event)" class="pagination-prev">{{::getText('previous')}}</a></li>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend to add the class to the anchor element or should it be on the li element like the rest?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intention is on the li because one can then target either the li or the anchor tags with the CSS, whereas putting it on the anchor tag still leaves the same problem if for some reason someone wanted to hook into the li tag for custom styling.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wesleycho, I think @RobJacobs was referring to that three of the classes were added to <li> elements and two were on <a>. Specifically, pagination-prev and pagination-next are on anchor tags.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that's just a mistake then.

- Add classes to allow the user to target the styles of component with more specificity

Closes angular-ui#4130
@wesleycho wesleycho force-pushed the feat/pagination-css branch from ee17761 to f93dec7 Compare August 7, 2015 17:18
@wesleycho
Copy link
Contributor Author

Fixed issues.

@icfantv
Copy link
Contributor

icfantv commented Aug 7, 2015

LGTM, part deux.

@wesleycho wesleycho closed this in b21c9ab Aug 7, 2015
@wesleycho wesleycho deleted the feat/pagination-css branch August 7, 2015 17:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants