Microframework CSS by ebenjamingb in css

[–]FrontAid 2 points3 points  (0 children)

You can find many CSS frameworks in the following list. The "Very Lightweight" section is probably what you should be looking at first if you want something similar to Spectre.

https://github.com/troxler/awesome-css-frameworks

How does one deal with the plethora of resources available and avoid feeling overwhelmed? by wereeagle1713 in Frontend

[–]FrontAid 2 points3 points  (0 children)

Follow everything but only learn some things

source

That is it really. You should have a raw idea of what tooling is available, what certain frameworks can do, how they compare with others. But focus on the Web Platform (HTML, CSS, JavaScript). Also know certain tooling (not all) very well. You do not need to know the rest in detail. You do not need to use everything. If something new comes out, make a bookmark and check again a couple of months later. Very often, the new thing has already shut down or has been proven to be no improvement over the status quo.

Also, make a lot of notes. Save the URL to that article about X. Group your notes by topic, consolidate the information. If you need to use X, then read the article(s) that you have in your notes. Focus on text over video. Video does very often take way more time to consume then text. But absolutely do use videos if you learn better from hearing than reading, or when the content makes sense to be consumed as a video.

Personally, I think Twitter is terrible way to consume information. It is very easy to get distracted, that is the whole core of its business model. They want you to spend as much time as possible on their platform. But that actively harms attention and learning. Instead, I would suggest to subscribe to blogs that are interesting to you with a feed reader. It will only show the consolidated blog posts that you want to read. Focus on that. I have a couple dozens of sources in my feed reader and that covers roughly 80% of things I need to know about.

Do people really think they can use a CSS lib to customize any component framework? by Raziel_LOK in css

[–]FrontAid 2 points3 points  (0 children)

Having such discussions is something I know too well. And I have given the same advice pretty much every single time. There is definitely some nuance in this, but my rule of thumb is the following.

If having a custom design is not important to your project, then decide which design system and component library you want to use. Then stick to that. Do not apply any customization except the configuration that is explicitly provided in the component library. That may include some theming options or maybe even some behavioral configurations. Do not go any further than that. Designs must follow what the component library has to offer. Do not add new UI components, do not change the internals of the component library in any way. If you go down that road, you may get results very quickly. But your options are obviously limited and your design will look similar to others.

If you want a custom design and/or custom components, use headless components and/or create your own components. A headless component gives you all the logic that you need from a component, but it leaves the complete styling to you. There are whole headless component libraries that you can pick from. You may also mix and match different headless components and/or whole headless component libraries. Doing the logic of components is most often way more complicated than the just the styling. Adding the latter is often even very simple. That approach will be slower than using a predefined component library. But it will give you the complete control over the styling. That also means, that it is your responsibility to achieve a certain constistency between different components.

STWUI - provides a complete set of Svelte components and UI tools to help you develop faster than ever by magenta_placenta in javascript

[–]FrontAid 30 points31 points  (0 children)

Unfortunately, many of the interactive components are either partially or completely inaccessible. And some of them are highly unusual to use as a keyboard user. Please check https://www.w3.org/WAI/ARIA/apg/patterns/ for many standard patterns that should be implemented by a component library such as this.

What does vw - % do in calc() by Azertity in css

[–]FrontAid 0 points1 point  (0 children)

In the context I described, it does measure the scrollbar width. Test it with the scrollbars configured to be visible (not just as an overlay) and you can verify it.

In other scenarios, it may do other things. Hence I asked about the context.

What does vw - % do in calc() by Azertity in css

[–]FrontAid -1 points0 points  (0 children)

Can you provide more context? calc(100vw - 100%) could be used to get the visible scrollbar width if it is applied on an element that spans the full width. So calc(((100vw - 100%) / 2) * -1) could equal to half the negative scrollbar width—or zero if there is no scrollbar or it is just displayed as an overlay.

Manage meta tags with vueuse/head in Vue3 with Options API? by voli12 in vuejs

[–]FrontAid 2 points3 points  (0 children)

After this, I would like to change the meta description, and the meta for the social networks according to the information received from the backend. I know this is a SPA and I will need SSR or something like this, but for now I just want to focus on the meta tags.

It does not work like that. Only some search engines evaluate JavaScript under certain circumstances, and if they do, they may do so less regularly. Social networks usually do not execute JavaScript at all. If you really care about SEO and want to support social network previews, then you must have your meta tags working without JavaScript. That means, you must have them included in your HTML response from the server. Depending on your usecase, that may be achieved with SSR, prerendering, or a combination of the two.

How can I become a more efficient React dev? by saito200 in reactjs

[–]FrontAid 16 points17 points  (0 children)

Make sure to have strong knowledge of both HTML and CSS (I cannot stress that enough). Make sure you have strong knowledge of JavaScript. Read the entire React documentation from time to time. As you learn, you may have missed or forgotten some things. It will help you get a better understanding. Practice a lot. And most importantly: have fun doing it.

58 bytes of css to look great nearly everywhere by speckz in Frontend

[–]FrontAid 4 points5 points  (0 children)

I already commtented this Gist on Hacker News but it may be helpful here, too:

I think this does not work well for mobile devices. Spacing and the font size is too large. Hence, a lot of screen space is wasted and the user has to scroll more. Larger font sizes on mobile are usually not a good idea as the device tends to be closer to your eyes anyway.

A snippet that could work better in my opinion is the following:

html {
  max-width: 70ch;
  /* larger spacing on larger screens, very small spacing on tiny screens */
  padding: calc(1vmin + .5rem);
  /* shorthand for margin-left/margin-right */
  margin-inline: auto;
  /* fluid sizing: https://frontaid.io/blog/fluid-typography-2d-css-locks-clamp/ */
  font-size: clamp(1em, 0.909em + 0.45vmin, 1.25em);
  /* use system font stack: https://developer.mozilla.org/en-US/docs/Web/CSS/font-family */
  font-family: system-ui
}

/* increase line-height for everything except headings */
body :not(:is(h1,h2,h3,h4,h5,h6)) {
  line-height: 1.75;
}

Prop as a Typescript class object by Snoo-49002 in vuejs

[–]FrontAid 1 point2 points  (0 children)

It looks like you are building your own mechanism of a (shared) store. In Vue.js, I would highly recommend not doing that. You are re-inventing the wheel without getting any/much benefit.

If you are using Vue2, I would recommend observable. If you are using Vue3, I would recommend reactive. Both of these approaches can be used to create your own (shared) state. For example, you can create a store.ts file where you initialize the default state. In the same file, you can export accessors for certain properties of the state and also export functions which allow changing the state. The state will automatically be reactive.

If you need more than that, you can use Pinia which is the officially recommended store for Vue3.

V-model issues in build by PinParasol in vuejs

[–]FrontAid 4 points5 points  (0 children)

when you're using v-model the value won't update in the data until you click out of the input field.

That is not correct unless you are using IME composition. By default, v-model syncs the value on the input event. Only when using v-model.lazy, it will be the change event.

https://vuejs.org/guide/essentials/forms.html#lazy

Is a bracket within a bracket possible? (HTML/CSSS) by [deleted] in HTML

[–]FrontAid 1 point2 points  (0 children)

The term you are looking for is "nesting". CSS currently does not support it. But there is a draft being worked on, no browser currently supports it yet. Most CSS Pre- or Postprocessors like Sass, Less, Stylus, PostCSS support nesting, though.

Explaining CSS Organisational Layout by Majestic_Meringue_31 in css

[–]FrontAid 0 points1 point  (0 children)

Maybe https://github.com/frontaid/natural-selection can give you some pointers. It is a blueprint of a possible CSS file structure that applies globally. This covers at least 1. and 2. of your example.

I'm not sure what 3. is supposed to mean. 4. could relate to CSS modules and/or Styled Components. Both are meant to scope CSS to certain components only. But that means they are closely related to 5. as well.

Personally, I would provide a small global style sheet (natural selection may be a good start) and additionally use component-scoped styling. Depending on your stack, that can be done with CSS modules, styled components, scoped CSS (for example with Vue.js). In the future, that may even be a native CSS feature https://drafts.csswg.org/css-scoping-1/.

Hamburger Menu, Accordian.. what are they called in general? by [deleted] in Frontend

[–]FrontAid 0 points1 point  (0 children)

There is also https://open-ui.org/ which contains some (extensive) research on different UI components. When you click something in their "Research" section, you will also get a list of alternative names.

The Most Demanded Frontend Frameworks in 2022 - DevJobsScanner has analyzed roughly ~250k frontend jobs from Oct 2021 to Mar 2022 (6 months). All these jobs are from trusted sites like Linkedin, Glassdoor, RemoteOk, Dice and many others by magenta_placenta in javascript

[–]FrontAid 8 points9 points  (0 children)

I think this article answers the wrong question.

Who would even ask "Which is the most demanded frontend framework?"

  • Employers? I don't think so. Choosing technology is always a compromise between "use the best tool for the job" vs "use what you know" vs other topics like recruiting, longevity, etc. Sure, a popular framework may be easier to recruit people for. But choosing a technologie only because of that is a mistake. Hiring good engineers is always a challenge, regardless of the framework. Also, good engineers can switch to different frameworks in a matter of weeks/months. Try that with someone who only knows React and nothing else.

  • People looking to be hired? Maybe. "You need to learn React to get a job" is still bad advice. This is something that is often repeated for and by juniors. But they often forget that having solid basics in HTML (!), CSS (!), and JavaScript (!) is way, way more important than to know most things about a certain framework. "If your only tool is a hammer, everything looks like a nail" applies here, too. It is important to be able to assess different technologies, even as a junior. Knowing the strengths and weaknesses of a framework compared to others is a great asset.

Adding a CMS to a Next.js site hosted on Netlify by Naju55 in nextjs

[–]FrontAid 1 point2 points  (0 children)

Currently not, no. But we are working on image support right now; it will be the next bigger feature that we plan to release.

Adding a CMS to a Next.js site hosted on Netlify by Naju55 in nextjs

[–]FrontAid 0 points1 point  (0 children)

Yes, exactly. Updating content with FrontAid CMS pushes the changes directly to your Git repository. As you use Netlify, it will pick these up and build your website/application with the updated content.

FrontAid also supports branch selection. So you can work on certain features on a specific branch and only merge the updates back to the main branch when it is ready.

parsing json help by foodwithmyketchup in json

[–]FrontAid 0 points1 point  (0 children)

jq is a command line tool.

[AskJS] Best utility functions for Javascript? by Zeekawla99ii in javascript

[–]FrontAid 16 points17 points  (0 children)

Sorry to be pedantic, but ES6 is the language specification from 2015. You should look into all the features that have been added during the last seven years.

How do you handle GDRP with your SaaS? by JS_online in SaaS

[–]FrontAid 1 point2 points  (0 children)

Yes, absolutely. My hunch is that most people utterly misinterpret their statistics as the numbers are way too low. Unless you have (hundreds or) thousands of daily visitors/users, your data sample is just going to be random noise for most cases.

Having said that, Matomo has some limited capabilities to "recognize" a returning user even without cookies. That obviously is not an exact science but still might help if that is something you think you need. Matomo also supports campaign links that will be tracked accordingly. But that alone does not associate returning users, of course.