views.admin.css has some way to generic css.

/* @group Inline lists */

.horizontal > * {
clear: none;
float: left; /* LTR */
}

.horizontal.right {
float: right;
}

.horizontal label {
position: absolute;
}

.horizontal .form-item > [class] {
margin-top: 25px;
}

.horizontal .form-item > [class] + [class] {
margin-top: 0;
}

/* @end */

This should be specified to just apply to the view form.

Comments

vollepeer’s picture

Where exactly are these styles used in the admin interface?

yesct’s picture

StatusFileSize
new434.78 KB

We looked for this css in views to see why it was being added and could not find it. We asked @dawehner where it came from and found it used to be needed when something was coming in from d7 ctools. But it's not used anymore and can be removed.

wheredoesitcomefrom.png

---

Next step.
Make a patch to remove those styles.
https://drupal.org/contributor-tasks/create-patch

R.Hendel’s picture

Assigned: Unassigned » R.Hendel

I'm in Dublin and try to make this patch.
If it works, it will be my first one :-)

R.Hendel’s picture

Status: Active » Needs review
StatusFileSize
new146.68 KB
new745 bytes

I removed this code from core/modules/views_ui/css/views_ui.admin.css:

/* @group Inline lists */

.horizontal > * {
  clear: none;
  float: left; /* LTR */
}
[dir=rtl] .horizontal > * {
  float: right;
}

.horizontal.right {
  float: right;
}
[dir=rtl] .horizontal.right {
  float: left;
}

.horizontal label {
  position: absolute;
}

.horizontal .form-item > [class] {
  margin-top: 25px;
}

.horizontal .form-item > [class] + [class] {
  margin-top: 0;
}

/* @end */

I took a screenshot after removing css and it looks alright to me. You'll find it attached...

R.Hendel’s picture

Assigned: R.Hendel » Unassigned
R.Hendel’s picture

Screenshot after patch

yesct’s picture

Status: Needs review » Reviewed & tested by the community

this looks ok to me.

I tried to find where the old ctools classes might have been, to see where they were removed, but got as far as:
a blame on line 457 in
http://drupalcode.org/project/drupal.git/blame/HEAD:/core/modules/views/...
showed it was added in
"Add the 7.x-3.x Views branch."
git checkout a626abb
and then
ag "horizontal" *
told me (among other things)

includes/admin.inc
1241:          'horizontal', 'right', 'links', 'actions',
1563:    $prefix = '<div class="ctools-no-js ctools-button ctools-dropbutton"><div class="ctools-link"><a href="#" class="ctools-twisty ctools-text">open</a></div><div class="ctools-content"><ul class="horizontal right actions">';
1568:    $prefix = '<div class="ctools-button"><div class="ctools-content"><ul class="horizontal right actions">';
2252:        'class' => array('inline', 'links', 'actions', 'horizontal', 'right')

I was hoping to find the places horizontal was used in views so I could make sure it was not needed anywhere, but I think @dawehner saying it's not used anymore might be enough. And I'm a bit confused if I even need to try so hard to find the old stuff and show it's gone. :)

yesct’s picture

Issue tags: +RTBC July 1

This issue was RTBC and passing tests on July 1, the beginning of API freeze.

alexpott’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs manual testing

I've searched views_ui for horizontal... it appears that it's not used anywhere... but it is in some more css!

In views_ui.admin.theme.css

.horizontal > * + * {
  margin-left: 9px; /* LTR */
  padding-left: 9px; /* LTR */
}
[dir="rtl"] .horizontal > * + * {
  margin-right: 9px;
  padding-right: 9px;
}
...
.views-ui-display-tab-bucket .horizontal.actions {
  margin-right: 6px;
}

.views-ui-display-tab-bucket .actions.horizontal li + li {
  margin-left: 3px;
  padding-left: 3px;
}

Afaics these should be removed as well... but of course this needs manual testing

R.Hendel’s picture

Assigned: Unassigned » R.Hendel
Issue tags: -Needs manual testing
R.Hendel’s picture

Assigned: R.Hendel » Unassigned
Status: Needs work » Needs review
StatusFileSize
new56.23 KB
new88.22 KB
new1.6 KB

In this patch I removed css-lines concerning to #9.
Because the old patch from #4 does no longer work I removed thoses lines again manually.
The reason why old patch failed are the quotation marks which must have been added in the meantime to css-attriutes in 8.x core:

< -[dir=rtl] .horizontal > * {
> -[dir="rtl"] .horizontal > * {

So I made no interdiff against old patch.

For testing:
- I created a view and activated option "Expose this filter to visitors, to allow them to change it"
- I compared views-ui page patched and unpatched and found no differences.
- I compared views rendered result page patched and unpatched and found also no differences.
- I searched with firebug for ".horizontal" in html-source and found it only in body or in relation with toolbar.

So I think it should be ok now.

Attached you find screenshots:

2029451-11-01.png

2029451-11-02.png

tstoeckler’s picture

Code looks good, still needs some manual testing from someone else, methinks.

dawehner’s picture

I think most of this css was written by jessebeach, so it would help if she could review all this deletions.

R.Hendel’s picture

Tested patch from #11 agains latest 8.x: it is still applyable.

jessebeach’s picture

In my queue to review.

jessebeach’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new115.71 KB
new84.32 KB

I checked and checked and couldn't find any references to the .horizontal class. It seems to have been replaced with .views-display-setting, but these unused CSS selectors weren't removed at the same time. I ran a CSS selector audit in Chrome and verified that these selectors aren't used (at least where I looked). I'm fairly confident these are vestigial.

CSS selector audit showing unused selectors from the patch

CSS selector audit showing unused selectors from the patch

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed fedfd49 and pushed to 8.x. Thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.