Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filtered: Use less instead of css #331

Merged
merged 1 commit into from
Oct 22, 2017
Merged

Filtered: Use less instead of css #331

merged 1 commit into from
Oct 22, 2017

Conversation

s7eph4n
Copy link
Contributor

@s7eph4n s7eph4n commented Oct 22, 2017

Filtered: Use less instead of css

This PR includes:

  • Update of RELEASE-NOTES.md
  • Tests (unit/integration)
  • CI build passed

@s7eph4n s7eph4n changed the title Filtered: Use css instead of less Filtered: Use less instead of css Oct 22, 2017
@s7eph4n s7eph4n merged commit bed9d97 into 2.5.x Oct 22, 2017
@gesinn-it-gea
Copy link
Member

gesinn-it-gea commented Jun 13, 2018

@s7eph4n could it be, that this changed the order, when the styles are loaded? We encounter issues, that custom less styles defined via Chameleon now get's loaded before the SRF styles, overrriding our custom styles.

Starting with SRF 2.5.3, our custom styles do not work as before.

@s7eph4n
Copy link
Contributor Author

s7eph4n commented Jun 13, 2018

I think the problem here is not the order of loading, but the specificity, that has changed for some rules.
E.g. in CSS there was this

.filtered {
...
}

.filtered-filters {
...
}

.filtered-filters .filtered-filter-spinner {
...
}

Now in Less we have

.filtered {
...
	.filtered-filters {
	...

		.filtered-filter-spinner {
		...
		}
	}
}

This compiles to

.filtered {
...
}

.filtered .filtered-filters {
...
}
.filtered .filtered-filters .filtered-filter-spinner {
...
}

So the solution is to also raise the specificity of your custom styles by wrapping everything in a rule targeting the filtered class, e.g.

.filtered {
  // YOUR STYLES HERE
}

@s7eph4n
Copy link
Contributor Author

s7eph4n commented Jun 13, 2018

Or alternatively we could modify the SRF Less files to restore the less specific rules, which may be a good idea. Patches welcome. 😉

@gesinn-it-gea
Copy link
Member

Ah, indeed, must have overlooked the nesting. We had

.panel {
  .filtered-filters {

After changing to

.panel {
  .filtered {
    .filtered-filters {

everything works as expected. Thx @s7eph4n .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants