Skip to main content
Share Your Experience: Take the 2024 Developer Survey
5 votes

Tooltip-overlay following the mouse pointer

I found this post and took your code and made some changes. I wanted to have a very small piece of javascript code that supported style-able tooltips. First, the way you were editing the CSS was to ...
Mike's user avatar
  • 51
4 votes
Accepted

Tooltip-overlay following the mouse pointer

Should I try to concentrate more on JavaScript only? I mean: Should I try to reduce the mandatory HTML-, CSS-code to a minimun? I think, the code i.e. HTML and CSS are minimal. Storing the tooltip on ...
Tushar's user avatar
  • 3,002
4 votes
Accepted

Small Bayes Calculator to learn Javascript

UX Overall, fine. Good use of labels. Getting an invalid input error off the bat is a bit jarring. Consider formatting the result to a readable number of decimal places (say, 2) unless you have good ...
ggorlen's user avatar
  • 3,540
3 votes

Resizable split DIVs Vue.js

Manipulating DOM with VueJS The biggest comment I have about this code is that it modifies DOM elements using vanillaJS techniques. With VueJS, there are ways of achieving this without needing to ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
3 votes

Lightweight Angular tooltip component

It just looks really good. I think it stayed this long unanswered because there's not much feedback to give. I reviewed and liked The commenting The naming The sizes of your functions Reading flow ...
konijn's user avatar
  • 33.2k
3 votes
Accepted

Different color classes that control the same stuff

Move all your duplicate code into a class, say gradient. Pick better names. A class name like light-green can mean anything, can ...
Peilonrayz's user avatar
  • 43.4k
3 votes

Toggle menu under specified screen width

There is no real reason to use JavaScript here. Using a CSS media query you can do this in a few lines: ...
RoToRa's user avatar
  • 11k
3 votes

Toggle menu under specified screen width

Feedback The code looks pretty good. The Javascript code waits until the DOM is ready, then caches references to DOM elements in variables before using those variables in the functions later on. I ...
Sᴀᴍ Onᴇᴌᴀ's user avatar
3 votes
Accepted

Simple modals in vanilla JS

import HelpMe from '../helpers/helpers'; const __ = new HelpMe(); This doesn't tell me what HelpMe is unless I look for it. ...
Joseph's user avatar
  • 25.1k
2 votes
Accepted

Styling the font size in a nav bar

You could remove all the duplicate lines in the @media queries and provide only the changes in these tags. This is beacause in CSS, the CSS classes that are ...
JohannesB's user avatar
  • 146
2 votes

Flexbox & BEM 'table'

I can't say much for flexbox, I haven't played with it. The React part is to sparse as well. However, general CSS I can do. ...
Joseph's user avatar
  • 25.1k
2 votes
Accepted

Showing the current view-position within the web page

Here are some improvements: Use IIFE. This will make the variables defined inside it private thus avoid cluttering globals Passing window and ...
Tushar's user avatar
  • 3,002
2 votes

Excerpt from a grocery shopping site using SASS

Just few things to highlight here Misusing Twitter bootstrap: The grid structure in bootstrap allows up to 12 columns across the page. ...
Tolani's user avatar
  • 2,465
2 votes
Accepted

SASS + Compass - File Structure and @Import order

Your way works, but it is not very scalable, since you have to compile all the sass files every time you make a change, this is time consuming when the project gets bigger. here you watch all the ...
Bamieh's user avatar
  • 136
2 votes
Accepted

"Spinning wheels" - Animated spinner with SVG and Sass-CSS

I totaly refactored your code (CSS and HTML). I wont address all the modifications and focus on the main ones : Browser support The is an issue in firefox when a percentage ...
web-tiki's user avatar
  • 894
2 votes

Simple SASS & BEM module for social feed widgets

I've reviewed your code and I can make the following remarks: While I like the BEM methodology, its not a panacea especially following it to the letter. You must seek simplicity to your code even if ...
Fanis Despoudis's user avatar
2 votes

Using CSS grid to align content in a non responsive div

I think the CSS looks fine. To your questions a.) It doesn't matter which container has the grid property. It's CSS. It's not semantic. b.) I am not sure if it is considered a best practice, but a ...
Moglash's user avatar
  • 568
2 votes

React board game app

Overall, it looks pretty good to me, pretty much all my comments are opinionated to a lesser or (often) greater extent. I'd summarize my main feedback as "YAGNI" and "think readability, not ...
Retsam's user avatar
  • 426
2 votes
Accepted

Rendering three vertical dots using SCSS

What you're looking for is just &: ...
Peter Taylor's user avatar
  • 24.1k
2 votes

React beginner exercise: Build a base arithmetic calculator

...
Ext3h's user avatar
  • 2,799
2 votes
Accepted

Compile SASS files in a directory via Gulp.js tasks, one of which produces logging output

Interesting question; some review remarks before addressing your actual question: You never seem to pass filePath to src but ...
konijn's user avatar
  • 33.2k
2 votes

Does this SASS make sense?

No, it does not make sense; the goal of SASS is to make things dry and maintainable. There's no point in writing: nav ul { @include py(1); } instead of: ...
Alessandro Lo Verde's user avatar
2 votes
Accepted

Simple website made for learning purposes

Well, there are a lot of things that come up to my mind but the first is that your CSS is overloaded with media queries. Ideally a well-structured CSS should have not so many declarations in the media ...
Alessandro Lo Verde's user avatar
2 votes

Task-list app, which allows to add and remove tasks from list

Adding elements As pointed out in "CertainPerformance's" answer adding content via HTML in this case can present a security risk. However adding elements via innerHTML should always be ...
Blindman67's user avatar
  • 22.1k
2 votes

Christmas tree made up only with HTML and CSS

You could make a few adjustments to your code: Positioning looks inconsistent here. Make sure to set your parent element's position to relative. An absolutely positioned element is positioned ...
Pi314's user avatar
  • 41
2 votes
Accepted

Prey Throbber using CSS Animation

Since you're using SCSS, why not use a SCSS @each loop with :nth-child() for setting the animation delay? It would also remove ...
Sean's user avatar
  • 327
1 vote

Using CSS grid to align content in a non responsive div

There are many things that, honestly, I don't consider best practices. In detail: a) Using a grid seems not necessary there: such a structure could be realised with flex box only. It would have better ...
Alessandro Lo Verde's user avatar
1 vote

SASS mixin for a font-awesome before/after usage

The $type can be passed in directly to the pseudo-class selector after you check its validity. ...
Adam's user avatar
  • 251
1 vote

SASS/SCSS mixin for button states

Formatting Format your code better. Put a space after the colon after properties. Don't put multiple properties in one line. Use of SASS Put your colors and lengths into variables so you can reuse ...
RoToRa's user avatar
  • 11k

Only top scored, non community-wiki answers of a minimum length are eligible