Problem/Motivation

The styles.css embeeded from tiny_slider.libraries.yml doesn't use any specific selector and break the global site style.

Steps to reproduce

Enable the tiny_slider module, create a slider block with views UI and use the block layout UI to place it.

Proposed resolution

Build a specific styles.css and embed it with specific selector (.tns-outer for example) instead of the one provided by the library.

If the change cannot be done, we can simply use the libraries-override keyword in the [theme].info.yml like this :

libraries-override:
  tiny_slider/tiny_slider:
    css:
      theme:
        /libraries/tiny-slider/demo/css/styles.css: false

To remove the styles.css load.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

titouille created an issue. See original summary.

aps-Andrew’s picture

I second this, I've just installed the library and all of a sudden it's started adding loads of generic and globally used css, some of it with !important tags on it all over my site, that'll break just about every site's CSS

kevinfunk made their first commit to this issue’s fork.

kevinfunk’s picture

Status: Active » Needs review
ipwa’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for your contribution @kevinfunk, this is working well.

  • ipwa committed 8641c80 on 1.0.x authored by kevinfunk
    Issue #3304623 by kevinfunk: Do not embed styles.css from library demo...
ipwa’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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