Comments (4)
Possible solutions:
- add some sort of
media-query
prop, which defines the breakpoint at which mobile layout is shown (or the inverse, if we want to be mobile first).- pros:
- explicit and clear where value comes from
- allows for media query to be changed and adjusted at runtime (not sure that's valuable tbh)
- cons:
- feels weird having a media query in a property/attribute/html
- need to ensure this prop is set on every instance of the component for consistency
- pros:
- read a media query from some pre-defined CSS variable e.g.
--duet-media-query
- pros:
- set once and all instances of the component will use the same value
- feels more natural to define a media query in css (could also be defined in html via
style
attribute)
- cons:
- implicit and not very clear where value comes from
- does not allow for media query to be changed and adjusted at runtime (much like regular media queries, so i don't think it's a drawback)
- pros:
Both of these would ultimately pass the value to matchMedia
. I am leaning towards option 2 since it's more natural to specify in CSS and every instance will naturally use the same value that way
from date-picker.
Hmm this is a good point, but I'm not sure how to solve it... You can't use CSS vars in media queries so it's not something that can be passed in easily. I'll have a think
from date-picker.
option 2 is exactly what I had in mind when I was looking for a solution.
from date-picker.
Hi,
any update on that subject ?
Option 1 would work perfectly for me.
from date-picker.
Related Issues (20)
- Screen readers announce hidden fields when navigating past date-picker-element
- "Uncaught SyntaxError: Cannot use import statement outside a module" error while using parcel v2
- TypeError: Cannot read properties of undefined (reading 'isProxied') HOT 1
- Disable some dates in date picker HOT 2
- Support only having some params set in localization HOT 2
- Have a month and year only selector MM/YYYY
- VoiceOver guidance is unclear after date is selected
- Support for readonly (as opposed to disabled)
- Support 3 letters for weekday names
- isDateDisabled should supply the date in ISO8601 string format
- Custom Element creates opinionated stylesheet with no option to exclude it. Better extract it as an optional import. HOT 1
- Support configuring amount of displayed months HOT 1
- Attribute "increment" is not working with duets date-picker 1.4.0
- Uncaught TypeError: Cannot read properties of undefined (reading 'getAttribute') HOT 1
- Cannot initialise component in Vue.js 3 HOT 3
- localization | attribute 'locale' does not translate hidden label for day (@duetds/date-picker/custom-element)
- Dates showing in words instead of numbers
- Retain the value after clicking on submit button in a form
- Calendar is not usable at 200%
- Selected element (date) is not properly identified HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from date-picker.