Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Tei
Feb 19, 2011

PRADA SLUT posted:

How do you make individual table cell a background color using CSS? I have a CSS file that notes style elements for the whole table, but is there a way to make individual cells a certain background color, without wrapping each of them in a div?

I am a bit rusty with css but..

[probably wrong code was here]

Tei fucked around with this message at 18:25 on Jul 17, 2017

Adbot
ADBOT LOVES YOU

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

PRADA SLUT posted:

<th><div class="myClass">Text</div></th>

For each one?

E: when the class is defined with background-color, it leaves a table with a "color stripe", respecting the text padding, instead of filling the entire cell and ignoring the padding.

https://jsfiddle.net/v71ynpms/

prom candy
Dec 16, 2005

Only I may dance

PRADA SLUT posted:

<th><div class="myClass">Text</div></th>

For each one?

E: when the class is defined with background-color, it leaves a table with a "color stripe", respecting the text padding, instead of filling the entire cell and ignoring the padding.

You can put a class on the th element itself, you don't need a div.

PRADA SLUT
Mar 14, 2006

Inexperienced,
heartless,
but even so
Ah, I was assigning the class to the div, not the th.

metztli
Mar 19, 2006
Which lead to the obvious photoshop, making me suspect that their ad agencies or creative types must be aware of what goes on at SA
I know the answer to this is probably "no" but... Does anyone know of a way to have javascript play an HTML5 audio element in Safari on an iOS device without requiring ANY user gestures? I know Apple is pretty thorough about this, but figure I would ask. Failing a fix for Safari, are there any browsers available for iOS that don't have the restriction of requiring a user gesture? Chrome doesn't seem to have the ability to disable that, and I'm just not familiar enough with the iOS browser situation to know of more.

I ask because I'd built a website for an academic research team that works doing assessments with children, and much of the functionality of the website was tied to events handling sound files playing and ending, with the kids only being able to select an option after the sound files had finished playing. Originally the application was for desktop browsers, but they're moving to mobile and I'm hoping there's a relatively straight-forward fix.

The Fool
Oct 16, 2003


https://developer.apple.com/library...Animations.html

The apple supported hack appears to be to have a single audio element, use a gesture to trigger it, then change the src on the fly to change which sound is playing.

The other path may be an html5 app publishing framework like phone gap: https://phonegap.com/

metztli
Mar 19, 2006
Which lead to the obvious photoshop, making me suspect that their ad agencies or creative types must be aware of what goes on at SA
I will give the first one a try; unfortunately Cordova and phone gap wont work without substantial rebuilding. Thanks!

duck monster
Dec 15, 2004


Hooray , more package managers! Just what JS was missing!

Tivac
Feb 18, 2003

No matter how things may seem to change, never forget who you are

duck monster posted:

Hooray , more package managers! Just what JS was missing!

It's not a new package manager though, it's a CLI wrapper around npm? :confused:

luchadornado
Oct 7, 2004

A boombox is not a toy!

Tivac posted:

It's not a new package manager though, it's a CLI wrapper around npm? :confused:

To their point - what real problem does npx solve, and should it have been prioritized lower (or not at all)? The associated medium.com post just rambled about a bunch of things that had easy workarounds so it wasn't very clear.

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

Helicity posted:

To their point - what real problem does npx solve, and should it have been prioritized lower (or not at all)? The associated medium.com post just rambled about a bunch of things that had easy workarounds so it wasn't very clear.

Web development in the current year.

Tei
Feb 19, 2011

Helicity posted:

To their point - what real problem does npx solve, and should it have been prioritized lower (or not at all)? The associated medium.com post just rambled about a bunch of things that had easy workarounds so it wasn't very clear.

I think it allows to run tools without actually having to fight with the OS.
Is a OS neutral way to run a tool.
The more OS neutral ways to do things we have, the better, because it makes tutorials simpler because the same instructions will work in OSX, Ubuntu and Windows.

Software developing is a different type of task than maintaining software. So It kind of make sense for tools designed for software developers to self-install and do that part automatically. You also want installing tools to be easier has possible, because is the first thing newbies need. You don't want the first lesson of a tutorial to be so hard, everyone quit in that part.

prom candy
Dec 16, 2005

Only I may dance
So should I be putting time into learning Cycle.js/redux-cycles/FRP?

Kekekela
Oct 28, 2004

prom candy posted:

So should I be putting time into learning Cycle.js/redux-cycles/FRP?

Understanding Cycle is worthwhile and will make you smarter but it's not something that you're likely to get a job using (afaik).

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



The http://stateofjs.com/ survey is open again if you want to join me in expressing mild disdain about parts of the ecosystem

prom candy
Dec 16, 2005

Only I may dance
I'm not looking for a new job necessarily, just looking to stay current and have an easier/more fun time building apps.

The Merkinman
Apr 22, 2007

I sell only quality merkins. What is a merkin you ask? Why, it's a wig for your genitals!

Munkeymon posted:

The http://stateofjs.com/ survey is open again if you want to join me in expressing mild disdain about parts of the ecosystem
I went to fill that out, but 17 more frameworks came out by the time it was done.

Tei
Feb 19, 2011

The best of javascript is that we will never be bored. Also the worst.

Flat Daddy
Dec 3, 2014

by Nyc_Tattoo

prom candy posted:

So should I be putting time into learning Cycle.js/redux-cycles/FRP?

I was disenchanted with cyclejs when I was going through a beginning tutorial series and at the end they said in the *advanced* series I'll learn how to dispatch events from repeated HTML elements.

if THAT is considered advanced then I'll never be able to use it in a team setting.

huhu
Feb 24, 2006

Munkeymon posted:

The http://stateofjs.com/ survey is open again if you want to join me in expressing mild disdain about parts of the ecosystem

The random quotes are good.

quote:

Next time make a survey that works with Javascript disabled.

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



huhu posted:

The random quotes are good.

Oh hey I didn't notice that earlier and oh hey wouldn't you know it the reload button doesn't work for me

E:

quote:

You hate Microsoft.

Is good too

E2: for back-end frameworks I helpfully added C#, Python and Java :)

Munkeymon fucked around with this message at 16:40 on Jul 19, 2017

Kekekela
Oct 28, 2004

huhu posted:

The random quotes are good.

lmao
"Thank You JS! Lost my job today because of you being so unfriendly, counterintuitive, impossible to grasp in big sophisticated code base."

e:
actual takeaways:
I should probably get around to learning SASS
Jest is underrated


e2: stop capitalizing things

Kekekela fucked around with this message at 18:16 on Jul 19, 2017

Tivac
Feb 18, 2003

No matter how things may seem to change, never forget who you are

Kekekela posted:

JEST is underrated

Jest is quite good, though unpleasant to use until they handle async tests that assert.

NinetySevenA
Feb 10, 2013


I really like SASS, I've not used any other CSS preprocessors before, but I really enjoy using SASS.

JavaScript Survey posted:

JavaScript is a horrible language that sent software development back to the dark ages. It has taken over 20 years to get this unruly abomination of a language to a useful and enjoyable state.

luchadornado
Oct 7, 2004

A boombox is not a toy!

It's at a useful and enjoyable state?

edit: if you're looking for a backend to play with, I've been doing Ratpack + Groovy/Kotlin at my new job. Such a nice, highly performing combination - highly recommended, especially if you've previously shrugged off the JVM because it's the JVM and Java can suck.

luchadornado fucked around with this message at 13:13 on Jul 20, 2017

Tei
Feb 19, 2011

Helicity posted:

It's at a useful and enjoyable state?

edit: if you're looking for a backend to play with, I've been doing Ratpack + Groovy/Kotlin at my new job. Such a nice, highly performing combination - highly recommended, especially if you've previously shrugged off the JVM because it's the JVM and Java can suck.

My OS teacher in the university was a cool cat guy, and he showed us some Java code written by a system programmer. It was very pretty, efficient, expressive and short. This was a long time ago, so I dunno now, probably you can write some quick rear end java code. What will stop you is the culture, Java culture is shaped by the corporate environment. And theres nothing bad with that, people on a corporate culture need a language they can trust, and Java has sacrificed himself for that :D

Munkeymon
Aug 14, 2003

Motherfucker's got an
armor-piercing crowbar! Rigoddamndicu𝜆ous.



Tei posted:

My OS teacher in the university was a cool cat guy, and he showed us some Java code written by a system programmer. It was very pretty, efficient, expressive and short. This was a long time ago, so I dunno now, probably you can write some quick rear end java code. What will stop you is the culture, Java culture is shaped by the corporate environment. And theres nothing bad with that, people on a corporate culture need a language they can trust, and Java has sacrificed himself for that :D

Elaborate jokes like https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition come from somewhere

luchadornado
Oct 7, 2004

A boombox is not a toy!

Tei posted:

It was very pretty, efficient, expressive and short. This was a long time ago, so I dunno now, probably you can write some quick rear end java code.

I agree that enterprise culture is a real detriment to the Java community, but there's no escaping that Java itself is a terse language. Efficiency and expressiveness are not traits you often hear in regards to it. Groovy, Kotlin, Scala, etc. were essentially designed to address these specific shortcomings. These languages all compile down to the same Java bytecode and interop is extremely good with some of them, so there is less a reason to intentionally limit yourself.

That enterprise FizzBuzz is amazing :allears:

HaB
Jan 5, 2001

What are the odds?
So at the new gig, they wanted me to learn Semantic-UI as their style/widget framework to use going forward.

After fiddling with it for a few days, here is my trip report.

Pros:
- it's SUPER pretty
- it's not Bootstrap
- once you get used to the "semantic-ness" of the syntax, it makes total sense. e.g.
code:
<div class="ui eight column grid">
does exactly what you assume it will
- did I mention it's pretty?

Cons:
- it's SUPER persnickety about you using it's theme system. Even something simple like overriding the font for the entire site has to be done in the theme, or you will be in hell.
- same thing with colors
- every time you update the theme, you have to recompile semantic with gulp build in the semantic directory. This makes your initial dev cycle when you are trying to get base styles set up go reeeeeaaaaalllllllyyyyyy slooooooooooooooooooowly
- it's fairly heavyweight when it's all said and done. You get a lot, but you pay for it.

So there you go.

http://semantic-ui.com

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

HaB posted:

- every time you update the theme, you have to recompile semantic with gulp build in the semantic directory. This makes your initial dev cycle when you are trying to get base styles set up go reeeeeaaaaalllllllyyyyyy slooooooooooooooooooowly

You could probably change the gulpfile yourself to use some watchers and auto-build directly into your project folder.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Helicity posted:

I agree that enterprise culture is a real detriment to the Java community, but there's no escaping that Java itself is a terse language. Efficiency and expressiveness are not traits you often hear in regards to it. Groovy, Kotlin, Scala, etc. were essentially designed to address these specific shortcomings. These languages all compile down to the same Java bytecode and interop is extremely good with some of them, so there is less a reason to intentionally limit yourself.

That enterprise FizzBuzz is amazing :allears:

I think I know what you're saying but this is probably the first time I've heard Java called 'terse'!

Vesi
Jan 12, 2005

pikachu looking at?

Thermopyle posted:

I think I know what you're saying but this is probably the first time I've heard Java called 'terse'!

Yeah I wondered about that too, figured he meant there's not many language features so the code has to be extra verbose with factory-factories and annotations all over the place

prom candy
Dec 16, 2005

Only I may dance

HaB posted:

code:
<div class="ui eight column grid">


Maintaining this kind of code is a nightmare. Stuff like this is great for getting stuff online quickly, but it's not scalable.

Ahz
Jun 17, 2001
PUT MY CART BACK? I'M BETTER THAN THAT AND YOU! WHERE IS MY BUTLER?!

prom candy posted:

Maintaining this kind of code is a nightmare. Stuff like this is great for getting stuff online quickly, but it's not scalable.

Why?

prom candy
Dec 16, 2005

Only I may dance
Your class names should describe what something is, not how it looks. When you have to make changes across lots of different areas of a site it makes it really difficult if everything has a ton of class names, and even more so when it's hard to tell which class names are related to which larger overall concept.

In my experience, systems like BEM are way better for creating CSS that scales. Your HTML says what things are, your CSS determines how they look.

geeves
Sep 16, 2004

prom candy posted:

Your class names should describe what something is, not how it looks. When you have to make changes across lots of different areas of a site it makes it really difficult if everything has a ton of class names, and even more so when it's hard to tell which class names are related to which larger overall concept.

In my experience, systems like BEM are way better for creating CSS that scales. Your HTML says what things are, your CSS determines how they look.

We had a developer that named everything generic like <button class="btn lrg org left"/> and it's been a night mare to deal with. He also made a bunch of generic jquery listeners with things like $("body").on("click", "div > ul >li", function....) that's made certain parts of our application a nightmare to debug. This was all before we started code review (this stuff gets slapped down quickly) as well as before we started using Less to help out with regurgitating styles.

prom candy
Dec 16, 2005

Only I may dance
We had a developer who did all that stuff too, and it was me. This is all stuff that seems like a really great idea until you have to scale it or maintain it.

Tei
Feb 19, 2011


Theres a lot of problems with something like this.

- How easy is to find documentation if it breaks?, because it will break, and if theres zero hits in google searching for soultions you are alone.
- What happens if you need a feature, and it don't provide, and you are forced to dig into the core, how it works, and write hacky code? is is expansible in a reasonable way.
- You don't need to turn css into a programming language because you already have a programming language: javascript
- Do this mean that the logic of the page is in two difference places? the css and javascript. What happens if they disagree?
- How portable is this stuff. If you work on this for 10 years, will other company hire you and consider these 10 years valuable?
- Ok is terse, but is readable by anyone other than the guy that wrote it?

Edit:
Or maybe not, and I am completely wrong.

Tei fucked around with this message at 06:42 on Jul 21, 2017

MrMoo
Sep 14, 2000

It's a bit fruity if you are used to CSS Grid, which pretty much everything supports now.

Adbot
ADBOT LOVES YOU

teen phone cutie
Jun 18, 2012

last year i rewrote something awful from scratch because i hate myself
what's wrong with just using flexbox? :shrug:

It's easy to use if you plan ahead.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply