« first day (3579 days earlier)      last day (1352 days later) » 

1:54 AM
What's a mix.js file for?
 
 
3 hours later…
5:01 AM
@Lapys For making delicious cocktails using JavaScript?
Although Google gives me this thing which is something to do with Laravel somehow but I really just found out about it. Seems to be something like a build tool plugin.
I also found this thing which I suspect is not related but it's cool.
 
5:38 AM
@sid Welcome to the JavaScript chat! Please review the room rules. If you have a question, just post it, and if anyone's free and interested they'll help. If you want to report an abusive user or a problem in this room, visit our meta.
 
 
8 hours later…
1:53 PM
🚽
 
🕵️‍♂️
 
2:20 PM
💩
 
🙏
 
😂
 
hellด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็ ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็ ด้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็็้้้้้้้้็็็็็้้้้้็็็็
(sorry for that)
 
2:53 PM
🤨
 
3:35 PM
Goddamn it. Why does every CSS rule have to be so !important? Come on, CSS rules are a dime a dozen. Or judging from the file 11k lines file I'm currently looking at, even cheaper than that. So, they aren't that important. People should stop marking them as such as it's evidently a lie.
Found that there is a rule that uses box-shadow: 0 0 0 #000 !important; and it was causing a minor but annoying visual glitch. Tried to find where that rule is defined by searching from that string and it's in four different files. Yes, each has a line that saysbox-shadow: 0 0 0 #000 !important;.
Is the box shadow really THAT crucial?
(the answer is "no", if you're wondering)
 
||> let important = true;
!important
 
@Wietlol false Logged: `` Took: 0ms
 
@VLAZ I think !important should be on every css rule
nothing is important after all
 
!yes
:P
 
you should have said "!no", considering I would use the same interpretation as "!important", it would be exactly what you want, independent of the interpretation
but yea, CSS' !important is kind of a sad thing
 
3:44 PM
I remember somebody telling me a story how they actually believed !important is "not important", so they annotated all the CSS they created with that. When it came time for code review, they learned what it was about.
 
you shouldnt be required to use it
 
@VLAZ big oof
 
if your css usage is not silly, you should be fine without it
but when you start using it, stuff gets messy and you have to use it more to fix it
 
In fact, I'd go as far to say that if you should get punished every time you use !important even if you're correct. That way you'd think twice before adding it.
 
I think I could make important a compiler error on my part
but to be honest, I am not even sure if it even exists
 
3:46 PM
With that said, there are some libraries that just put direct in-line CSS because fuck everybody. If it's dynamic, you often can't feasibly go without !important. However, these are not THAT frequent.
@Wietlol I think there might be an option with scss-lint for that. But honestly, I've not used that almost ever. Probably to the detriment of the code base, to be honest.
 
I dont use css files though :D
as I said, "a compiler error"
I am using stuff that gets compiled to js, css and html
I think I could overload the important function and make it 100% ambiguous, which means you cannot use it
I did the same with some logging functions to avoid accidentally using the default ones (which I absolutely do not want to use)
 
important = Math.random() < 0.5 ? "!important" : ""
 
// good luck debugging this
#define true rand() > 0.01
I saw ^ that once...
it was the evilestest thing I have ever seen
 
Some more examples here and here
This one is particularly evil:
#ifndef _DEBUG
#define if(x) if(rand()<0.0001 && (x))
#endif
When you're not running under debug, there is 0.01% chance for the if to flip the result.
The Java one straight up starts redefining what the values of integers are.
 
wouldnt that make everything false 99.99% of the time?
the Java one of changing the primitive cache is also evil, yes
I used to do "Monday" == "Saturday"
but in newer versions of Java, this is impossible
 
4:00 PM
ARGH! Looking at this CSS drives me insane. font-size: 0.875rem; //14px does it meant that it corresponds to 14 px? Because this is a relative size, so no - it doesn't necessarily mean that. Is it just the previous value there and was changed to 0.875rem? Well, don't leave the comment. It's useless - if I want to change it, at most, I'll try it out in the browser until it's correct. No point in keeping this junk around.
 
 
3 hours later…
Jay
6:38 PM
anyone know how to detect if a user selects all the text and/or clears a text field?
 
@Jay sure
 
Jay
like highlight all the text and hit backspace or delete
 
|| mdn selectionStart
 
|| mdn KeyboardEvent keycode
 
Jay
sweet, thanks @JBis setSelectionRange() should work
 
 
4 hours later…
10:28 PM
 

« first day (3579 days earlier)      last day (1352 days later) »