J4 Issue ?
avatar ciar4n
ciar4n
25 Jun 2018

Quite a few list type views include logic to add a first class to the first item and a last class to the last item on the list. Do we really them?

IMO these complicate the views with little benefit. Especially considering we can now easily target these items with CSS pseudo classes like :first-of-type and :last-of-type.

Example.. https://github.com/joomla/joomla-cms/blob/4.0-dev/components/com_content/tmpl/category/default_children.php#L22-L27

Losing them is a potential b/c break with templates which happen to use them.

avatar ciar4n ciar4n - open - 25 Jun 2018
avatar joomla-cms-bot joomla-cms-bot - change - 25 Jun 2018
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 25 Jun 2018
avatar mbabker
mbabker - comment - 25 Jun 2018

I'd say drop them. About the only reason I can see to keep them is if you're still supporting IE8 where the pseudo-classes aren't reliably available, and that's obviously not in J4's supported stack.

avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Jun 2018
Category Layout
avatar franz-wohlkoenig franz-wohlkoenig - change - 25 Jun 2018
Status New Discussion
avatar C-Lodder
C-Lodder - comment - 25 Jun 2018

Before removing, double check the JS to ensure they're not being referenced there

avatar brianteeman brianteeman - change - 25 Jun 2018
Labels Added: J4 Issue
avatar brianteeman brianteeman - labeled - 25 Jun 2018
avatar ciar4n
ciar4n - comment - 27 Jun 2018

PR created #20887

@C-Lodder From what I can make out, they are not been referenced in the JS.

avatar ciar4n ciar4n - change - 27 Jun 2018
Status Discussion Closed
Closed_Date 0000-00-00 00:00:00 2018-06-27 09:32:18
Closed_By ciar4n
avatar ciar4n ciar4n - close - 27 Jun 2018

Add a Comment

Login with GitHub to post a comment