There is a GitHub issue for this problem, but there is no working solution and the issue is locked. The issue does mention setting Swipers‘ roundLengths to true, but this didn’t work for me.
My workaround (for a single slide slideshow):
.swiper-slide-next {
translate: 1px 0;
}
It reliably fixes the problem without affecting the slideshow on devices that don’t have this issue.
Not the first time i ran into problems with SVGs preserveAspectRatio attribute, but i can’t remember a case where Firefox handled this different from Chrome. However, lets have look at the this weird behavoir.
The goal was to build a very flexible lines-background-element with CSS-Grid:
Chrome result without preserveAspectRatio=“false“ on the SVG-Wrapper
While Chrome renders everything perfectly fine, Firefox produced this:
Firefox result without preserveAspectRatio=“false“ on the SVG-Wrapper
So after testing around, with the background-size, -position, etc. the conclusion was that the SVG itself must be the problem. And it kinda was, but i’im pretty sure its a Firefox Bug with SVG + background-size. As you can see in the code, i was not trying to change the aspect-ratio in any way, i just set a fixed with + auto height for the background and let em repeat verticaly, so the preserveAspectRatio shouldn’t needed here.
For now, there is no placeholder attribute available for HTML select elements what is really bad if you need to achive some kinda reduced form styling, without field labels and stuff.
Example form with placeholder style select label
But there is a workaround, we have to add the label as the first option with a value=““. Now we want to style it like the other placeholder texts. To do so we need just a little JS & CSS:
Problem: I have some buttons with one skewed side using skewed, absolute positioned pseudo element. In Firefox the pseudo element (::before) looks blurry and the blur overlaps the parent element, so it looked really bad.
Solution: After a failed Google search i tried to fix it on my own. The simple solution is: Add transform: skew(0) to the parent element.
Lately i was running into an Safari issue – what happens really often lately, i really start to fall in love with this „amazing“ piece of software. Whatever – the thing is, you may come to the idea to define all of your animation properties and set it to animation-play-state:paused. So you can simply trigger the animation with help of an equal class, lets say .play{ animation-play-state: running; }.
I first heard of the object-fit attribute a couple of month ago and i make extensive use of it since this ‚magic moment‘. It’s just so freaking helpfull for RWD that i won’t miss it anymore.
The worse thing about it, like most new techniques, some major browsers do not support it. It’s just IE & Edge and personaly i wouldn’t give a shit about them, but as web professionals – sadly – we still have to care about those.
So i found a nice workaround which will work in all Browsers supporting the background-size property.
It’s pretty simple: In JavaScript, use modernizr to detect missing object-fit support, read out the image path, set the image as background to the parent container. The rest ist just a little css.
Please see the detailed solution here: https://medium.com/@primozcigler/neat-trick-for-css-object-fit-fallback-on-edge-and-other-browsers-afbc53bbb2c3
If you ever need to have a sticky sidebar, which has a variable height, which is working well with a footer region, without having a second scrollbar … try https://github.com/somewebmedia/hc-sticky
Trying to build this with waypoint.js or something, is pain in the ass. This great library finished the job in < 5 minutes.
This solution is also very usefull on pages with -Tag. Sometimes the basetag will make anchor links not working properly anymore (redirecting to the base url).
$(document).ready(function () {
// Anchor links on click based on Chris Coyier's solution: https://css-tricks.com/snippets/jquery/smooth-scrolling/
$('a[href^="#"]:not([href="#"])').click(function(e) {
if (location.hostname == this.hostname) {
var target = $(this.hash);
target = target.length ? target : $('[name=' + this.hash.slice(1) +']');
if (target.length) {
$('html, body').animate({
scrollTop: target.offset().top - 80 + 'px'
}, 1000);
return false;
}
}
});
});
// Smooth scrolling anchor links
// to top right away
if (window.location.hash)
scroll(0, 0);
// void some browsers issue
setTimeout(function () {
scroll(0, 0);
}, 1);
$(function () {
// *only* if we have anchor on the url
$( window ).load(function() {
if (window.location.hash && $(window.location.hash).length > 0) {
// smooth scroll to the anchor id
$('html,body').animate({
scrollTop: $(window.location.hash).offset().top - 80 + 'px'
}, 1000, 'swing');
}
});
});