Some changes to code views in hgweb
Jordi Gutiérrez Hermoso
jordigh at octave.org
Mon Oct 1 10:07:58 CDT 2012
On 27 September 2012 17:49, David M. Carr <david at carrclan.us> wrote:
> On Thu, Sep 27, 2012 at 4:57 PM, Matt Mackall <mpm at selenic.com> wrote:
>> On Tue, 2012-09-25 at 17:00 -0400, Jordi Gutiérrez Hermoso wrote:
>>> There are two things I don't like about hgweb's code views:
>>> 1) When trying to select code for pasting, you also get lines of code.
>>> I would like to disable that like like this:
>>> Is it acceptable to use prefixed CSS rules in hgweb?
>> I don't have any strong objection to that.
>>> 2) The stripes are jarring and conflict with some Pygments styles. Can
>>> we get rid of stripes for code views? The stripes make more sense for
>>> lists of similar-looking data such as revisions, but I don't like them
>>> for code views, and hg is rather unique out there for using stripes
>>> for code views.
>> I'm on the fence about it. Any other opinions?
> I'm definitely in favor of copy-paste not including the line numbers,
> and I'm fine with using prefixed CSS rules to accomplish it.
One of my SOCIS students has actually written about this. It's kind of
a hilarious read:
> I also find the striping in code views unusual, and jarring when
> highlighting is in use. I'd lean towards leaving the
> "parity0/parity1" classes in place (so that people who want striping
> can easily have it with a CSS-only tweak), but change the CSS files
> included in the default templates to not do anything with those
> classes in code views.
The reason why I asked about both of these things at once is that it's
actually difficult to have both parity0/parity1 classes *and* make the
code copy-pasteable without line numbers. If I could get rid of the
line numbers, it would simplify matters, since I could use the table
- Jordi G. H.
More information about the Mercurial-devel