390 karma · joined Jul 13, 2020 (6y ago) · 80 submissions
comment 5y ago · link · parent
PS: We maintain a list of helpful Git CLI tools on https://github.com/frontaid/git-cli-tools
comment 5y ago · link · parent
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
- https://caniuse.com/mdn-javascript_builtins_intl_datetimefor...
Parsing, however, is an entirely different topic. I assume the Temporal proposal authors learned from the Date.parse fiasco. To this day, there are browser inconsistiencies that make it largely unusable for anything else than the full-length ISO date format. Hence, it might be better to use a userland library that works consistently regardless of the browser (version). There are also some notes about parsing in https://tc39.es/proposal-temporal/docs/parse-draft.html:
> Temporal's approach to most operations—including parsing—is to encourage strong typing, e.g. Temporal.Instant.from vs. Temporal.PlainDateTime.from. A type-spanning "parse anything" API goes against that strongly-typed model.
comment 5y ago · link · parent
Agreed. But if you want to have validation and autocompletion in most editors, it is still the way to go. We use it to validate JSON content files for a CMS [1]. It is a little repetitive in our case (e.g. the `:name`/`:description` keys are repeated), but not that bad. Newer versions of JSON Schema [2] have improved in that respect, but most editors (or plugins) and tooling in general is still based on older versions. So we have to stick with those for a while.
[1] https://github.com/frontaid/schema/blob/master/frontaid-sche...
[2] https://json-schema.org/specification.html
If you have to deal with JSON a lot, you might want to checkout https://www.schemastore.org/json/ which has schemas for a large number of file types.
comment 5y ago · link · parent
<div tabindex="0"><input ...></div>
Because of that, it is sometimes necessary to tab twice to focus the next element. Not sure whether that is a problem of DaisyUI in general or just their website. But it is definitely annoying.comment 5y ago · link · parent
If someone does not like the ECMAScript specification, that is fine. But at least use a proper unofficial documentation like MDN.
comment 5y ago · link · parent
[1] https://tc39.es/ecma262/multipage/ecmascript-language-expres...
comment 5y ago · link · parent
> [1, 2, 3] + [4, 5, 6] // -> "1,2,34,5,6"
What would you expect instead?
> [,,,].length // -> 3
Is there any use case where you would want to deal with sparse arrays?
comment 5y ago · link · parent
Tresorit has that feature and it works great. Aside from data encryption, it was the main reason why I switched from Dropbox.
https://support.tresorit.com/hc/en-us/articles/217103697-Exc...
comment 5y ago · link · parent
[1] https://github.com/w3c/csswg-drafts/issues/5796
[2] https://philipwalton.com/articles/responsive-components-a-so...
comment 5y ago · link · parent
comment 5y ago · link · parent
> What can the web designer do?
Completely disagree with this section.
Each of the suggested device categories (Desktop/laptop, Tablet, Phone) has many different screen sizes/resolutions. And all of them might have screens in landscape or portrait mode. All of these devices might support multi-tasking with varying split screen sizes. All of those devices support custom accessibility configurations for font-sizes, zooming or both. By detecting the UA and trying to shoehorn it into a certain category, you only increase the number of issues for the users.
One part of a solution to this problem is to use relative CSS units. Avoid hard breakpoints whenever possible. Only break columns into rows when there is no more space left.
comment 5y ago · link · parent
Did you have some specific tool in mind? Because I completely agree that this is a great way of working with content. We have been doing that for a couple of months with our own tool. It uses Git and stores content in a pretty-printed JSON file. Techies can update that directly and push it manually. Content editors can use our tool to edit and commit to Git with a simple Web UI. Would that go into a direction you were thinking of?
comment 5y ago · link · parent
comment 5y ago · link · parent
https://www.zdnet.com/article/firefox-to-ship-network-partit...
comment 5y ago · link · parent
comment 5y ago · link · parent
comment 5y ago · link · parent
54.
Fluid Typography with two-dimensional CSS Locks(frontaid.io ↗)
3 points · by FrontAid · 5y ago · discuss
comment 5y ago · link · parent
> Selectors have terrible future-proofing. We should have split on top-level commas, and only ignored unknown/invalid segments, not the entire thing.
That forces you to duplicate declarations for backward-compatibility. For example, you can't combine those two selectors:
/* works */
:user-invalid {}
:-moz-ui-invalid {}
/* breaks */
:user-invalid, :-moz-ui-invalid {}
Somewhat related to the link: https://github.com/jensimmons/cssremedy tries to "fix" some of those issues.comment 5y ago · link · parent
h1::first-line {font-size:2rem;}
h1 {font-size:1.5rem;}
It will show the first line of a heading in a larger and all further lines in a smaller font size. Additionally, you could hyphenate headings.edit: And fluid typography might be something to look into. Currently, you seem to have a single breakpoint where font size is adapted. That does not work well on larger phones.
comment 5y ago · link · parent
But what I do use sometimes is a CSS reset like https://github.com/necolas/normalize.css
And what I also use is this CSS boilerplate: https://github.com/frontaid/natural-selection (Disclaimer: I created it because I wanted to avoid the repetitive work of writing out all the selectors).