News for hackers. Stuff that matters.

xkyf

Re:HTML and CSS techniques to reduce your JavaScript on Saturday June 05, 2021 @12:26PM (#27406374)
> doing exactly the same thing only via css instead of a html attribute

Yes! What's wrong with this approach? We have a lot of old HTML attributes that were used for styling that have been replaced by CSS.

> Yes, I know there are workarounds using flexbox, grid, etc

It's not a "workaround!" You're controlling the appearance using the styling language. What's wrong with this example?

https://jsbin.com/wexisiyamo

> "responsive" as in hide rows of table cells on some resolutions to make things fit better

HTML attributes (like colspan) don't do this! CSS does.

> it does not manipulate the amount of table rows a table-cell-display element takes up

I know, I mentioned it before :) it's related though.

With HTML attributes the layout is tied to your markup. Like you said it's more than table {display:grid;} but is adding .colspan-2 a lot more cruft than adding [colspan=2]?

Re:HTML and CSS techniques to reduce your JavaScript on Friday June 04, 2021 @04:32PM (#27398750)
We aren't, you need to be more specific.

> I have to rebuild the table layout

The "layout" meaning the visual appearance, or the markup?

There IS a "css equivalent of colspan/rowspan for table-layouts," put another way--a way to make a column or row (<td> or <tr>) appear to span multiple columns or rows. It can be achieved with flexbox or with CSS grid.

You don't need to change anything about the markup (HTML) to make this work.

> to make it responsive

"Responsive" as in "responds to the size of the viewport?" The colspan and rowspan HTML attributes do not do that. They have the same value regardless of the size of the viewport. CSS (with media queries) can respond.

> the column-span property is unrelated to tables

Incorrect, it is certainly related, and works there just fine (along with other in-flow block-level elements).

Re:HTML and CSS techniques to reduce your JavaScript on Friday June 04, 2021 @09:09AM (#27393231)
You can! CSS Grid works just fine with <table> and its related elements. In fact Grid is overkill here, you can span multiple rows or columns using flexbox alone. You don't need to "rebuild" anything, use the same markup.

You couldn't control colspan/rowspan with CSS before, only HTML, which isn't responsive. (Ignoring the `column-span` property which isn't very flexible.)

Re:HTML and CSS techniques to reduce your JavaScript on Thursday June 03, 2021 @09:42PM (#27389559)
Sure there is, the grid-row and grid-column CSS properties

https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_La...

That gets discussed every time, hackers were using prepaid cash services. Ransomware predates cryptocurrencies by decades.
Re:Making JavaScript run fast on WebAssembly on Wednesday June 02, 2021 @03:32PM (#27372983)
Run quickly*