Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The views-admin.rubik.css should only be loaded when on the views ui.
This should not be loaded on every page.
Comments
Comment #1
ericduran CreditAttribution: ericduran commentedHere's a patch. This patch does a couple of things.
- It remove views-admin-rubik.css from rubik.info file
- it renames the views-admin-rubik.css to views-admin.rubik.css since thats the appropriate syntax.
- Add a css alter to rubik_css_alter because views will add the css if it's assuming it's on the views module folder. Instead we change the data attribute to replace it with our rubik theme folder.
Comment #2
ericduran CreditAttribution: ericduran commentedFYI: I added a patch to views #1221560: Allow any theme to declare their own views-admin.{theme_key}.css which should make this easier. If that patch gets in, we can remove the css_alter for the views admin css file.
Comment #3
fxarte CreditAttribution: fxarte commentedI could not apply the patch, there may have been some changes in the theme since it was created so I created a new one
Comment #4
fxarte CreditAttribution: fxarte commentedComment #5
ericduran CreditAttribution: ericduran commentedThis patch is no longer needed, at least not the whole patch.
I open an issue in the views queue to fix the problem with views-admin theme not being loaded.
Comment #6
CoffeyMachine CreditAttribution: CoffeyMachine commentedThe patch by fxarte did not include the new renamed views-admin.rubik.css. I went ahead and re-did the changes myself and just committed.
Even though views may allow for this in the future, I think this is a fix worth including now. We can revisit this and remove the lines in the rubik_css_alter once #1221560: Allow any theme to declare their own views-admin.{theme_key}.css gets committed and released.
Thanks folks.
Comment #8
codi CreditAttribution: codi commentedSorry to re-open. The change to views was made so I've removed the css_alter.
Comment #9
ericduran CreditAttribution: ericduran commentedLooks correct to me, and with some clean up :)
Comment #10
CoffeyMachine CreditAttribution: CoffeyMachine commentedCommitted to 7.x-4.x
Thanks!