css

Elements 'twitching slightly' when implementing scroll anchoring

人走茶凉 提交于 2021-02-10 05:33:28
问题 EDIT: Embarrassingly, I originally saw this issue on Chrome but the issue was because I was slightly zoomed out on the browser causing subpixel element sizing. If the elements are full pixel heights it works fine. However, I believe this is still an issue as Firefox seems to render sub-pixel elements differently to Chrome and also we should support zooming. I'm trying to implement scroll-anchoring cross-browser so that when appending a new element to an overflow container and the user is

Stack scrolling with scroll-snap and position sticky

 ̄綄美尐妖づ 提交于 2021-02-10 05:25:15
问题 I'm using scroll-snap in combination to position: sticky which seemed like an elegant approach to enable a stacking card effect while scrolling. It works pretty great on desktop but on Safari (iOS12.1) I'm experiencing glitches where sometime the cards scroll all together, skipping content. The most obvious way to replicate the bug on mobile Safari is to: scroll down to the bottommost screen close (blur) and reopen Safari then trying to scroll back up again Bug experienced: it's skipping all

Stack scrolling with scroll-snap and position sticky

≯℡__Kan透↙ 提交于 2021-02-10 05:24:51
问题 I'm using scroll-snap in combination to position: sticky which seemed like an elegant approach to enable a stacking card effect while scrolling. It works pretty great on desktop but on Safari (iOS12.1) I'm experiencing glitches where sometime the cards scroll all together, skipping content. The most obvious way to replicate the bug on mobile Safari is to: scroll down to the bottommost screen close (blur) and reopen Safari then trying to scroll back up again Bug experienced: it's skipping all

How do I make two side by side buttons with margin in between have a total width equal to the precedding text input (100% width)?

旧巷老猫 提交于 2021-02-10 05:22:35
问题 I am trying to make two buttons scale appropriately with in between margin responsive design. How do I properly specify width of each button with the margin to stay constant in between? Equal width buttons are below that I am trying to scale together, without exceeding the total width. |--------------------100%------------------------| |---Button 1---||--margin in px--||---Button 2---| Here is what I have so far.. button1.back-btn { @include btn-inline; } button2.next-btn { @include btn

change colour of a html slider button as it scrolls

天涯浪子 提交于 2021-02-10 05:20:49
问题 here i have my simple slider which i am theoretically going to use to control a stepper motor's movement based on the slider position. I wanted to make the website that it will be hosted on look professional so i have spent a long time trying to figure out how to change the button colour while it scrolls (this is because the motor is controlling my boiler temp so a visual representation of temp would be nice) but my problem is changing the css value. I know to use document.getElementById(

How to remove cloned element div except first div using jquery

生来就可爱ヽ(ⅴ<●) 提交于 2021-02-10 05:15:48
问题 I have a problem with removing cloned div. I*m unable to remove the cloned div which div clicked on to be remove. My code is like below: <div id="item_details"> <table> <tr> <td> <p class="label_text">Name:</p> </td> <td> <input name="item_name[]" type="text" value="" id="item_name" class="input_text" style="width: 126px;" /> </td> <td> <p class="label_text">Brand:</p> </td> <td> <input name="item_brand[]" type="text" value="" id="item_brand" class="input_text" style="width: 126px;" /> </td>

CSS Opacity transition with display: none

梦想的初衷 提交于 2021-02-10 05:13:46
问题 I have a menu that I would like to fade in with javascript. I want it to transition from display: none and opacity: 0 to display: flex and opacity: 1 . But when I set opacity to 1 using javascript, it doesn't transition, and instead abruptly snaps to 1, whereas If I do not set display to none, it gracefully transitions. I want to use display: none because before the menu appears I need to be able to catch mouse movement on a canvas in the background. I have made a codepen to demonstrate this

React does not recognize the `isActive` prop on a DOM element - styled-components

荒凉一梦 提交于 2021-02-10 05:13:16
问题 I have the following svg component where I am passing props. import React from 'react'; export default (props) => ( <svg {...props}> <path d="M11.5 16.45l6.364-6.364" fillRule="evenodd" /> </svg> ); I then have a styled-component that looks like this. const Icon = styled(_Icon)` ${props => props.isActive && css` transform: rotate(-180deg); `}; `; I am seeing the following react error. Warning: React does not recognize the isActive prop on a DOM element. 回答1: I ran into the same issue with

CSS animation-fill-mode and z-index issue

送分小仙女□ 提交于 2021-02-10 05:11:13
问题 I'm using CSS animations (from animate.css) in a project I'm working on. What I found out is that when fading in a container with an absolutely positioned and z-indexed child in it, the z-index of the child isn't working as it should. I recreated the issue in this fiddle: http://jsfiddle.net/Lxsf9ako/ The issue seems to be caused by animation-fill-mode: both; This style is placed on the container by animate.css, thus I have no control over this. I could overwrite it by using animation-fill

React does not recognize the `isActive` prop on a DOM element - styled-components

末鹿安然 提交于 2021-02-10 05:10:40
问题 I have the following svg component where I am passing props. import React from 'react'; export default (props) => ( <svg {...props}> <path d="M11.5 16.45l6.364-6.364" fillRule="evenodd" /> </svg> ); I then have a styled-component that looks like this. const Icon = styled(_Icon)` ${props => props.isActive && css` transform: rotate(-180deg); `}; `; I am seeing the following react error. Warning: React does not recognize the isActive prop on a DOM element. 回答1: I ran into the same issue with