From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Sen Hastings <sen@phobosdpl.com>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v1 2/2] support/scripts/pkg-stats: optimize CSS selector usage
Date: Sat, 6 Aug 2022 23:55:57 +0200 [thread overview]
Message-ID: <20220806235557.5d498b6d@windsurf> (raw)
In-Reply-To: <20220805200114.288208-2-sen@phobosdpl.com>
Hello Sen,
On Fri, 5 Aug 2022 15:01:14 -0500
Sen Hastings <sen@phobosdpl.com> wrote:
> Having lots of CSS selector declarations adds up, especially at 70k+
> elements.
>
> This reduces the number of CSS selectors printed in the markup
> to the bare minimum, by using pseudo-classes and tag names as selectors.
Not sure how this works. Is there a significant size benefit? Sometimes
having a dumb but obvious solution is better than having a smart but
convoluted solution.
> +div {
> + text-align: center;
> + border: solid 1px gray;
> +}
> +#results-grid div{
> + text-align: left;
> +}
> +#package-grid div:nth-child(13n+1), #package-grid div:nth-child(13n+13) {
> + text-align: left;
> +}
> +#package-grid div:nth-child(13){
> + text-align: center;
What is this 13 magic number?
Also, unrelated to this, when I look at the currently generated HTML,
it looks odd. I see things like this:
<div id="upstream_url__package_kodi-audiodecoder-vgmstream_kodi-audiodecoder-vgmstream" class="centered upstream_url data _package_kodi-audiodecoder-vgmstream_kodi-audiodecoder-vgmstream good_url"><a href="https://github.com/xbmc/audiodecoder.vgmstream">Link</a></div>
Why do we have these crazy id values now? why does the class property
contain a value such as
_package_kodi-audiodecoder-vgmstream_kodi-audiodecoder-vgmstream?
Thanks!
Thomas
--
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-08-06 21:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-05 20:01 [Buildroot] [PATCH v2 1/2] support/scripts/pkg-stats: move to procedurally generated row/column clases Sen Hastings
2022-08-05 20:01 ` [Buildroot] [PATCH v1 2/2] support/scripts/pkg-stats: optimize CSS selector usage Sen Hastings
2022-08-06 21:55 ` Thomas Petazzoni via buildroot [this message]
2022-08-06 21:51 ` [Buildroot] [PATCH v2 1/2] support/scripts/pkg-stats: move to procedurally generated row/column clases Thomas Petazzoni via buildroot
2022-08-30 6:32 ` Sen Hastings
-- strict thread matches above, loose matches on Subject: below --
2022-08-08 22:23 Sen Hastings
2022-08-08 22:23 ` [Buildroot] [PATCH v1 2/2] support/scripts/pkg-stats: optimize CSS selector usage Sen Hastings
2022-08-30 6:34 ` Sen Hastings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220806235557.5d498b6d@windsurf \
--to=buildroot@buildroot.org \
--cc=sen@phobosdpl.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox