Giter VIP home page Giter VIP logo

ar5iv-css's People

Contributors

dginev avatar pickfire avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

pickfire

ar5iv-css's Issues

Two-column theme?

It is uncanny how close we get to the the 2-column view in the PDF files for some .cls files by simply by adding:

.ltx_abstract,
.ltx_section,
.ltx_appendix,
.ltx_bibliography {
  columns: 2;
}

To the CSS ruleset. Adding that as a toggle-able theme, orthogonal to the light/dark theme toggle, feels rather reasonable as an experiment.

But every type of content that refuses to reflow, makes this difficult. Cases I've spotted on a quick glance:

  • long display equations, and their tags
  • certain side-margin notes get stuck between columns
  • verbatim code blocks sized for a single-column width
  • tables sized for a single-column width

So maybe it is best to defer this until we can auto-reflow nearly everything, and see if there is additional interest / ideas floating around.

responsive equations

Large equations (and equation groups) are pretty hard to navigate on a vertical phone display, as bad as a PDF equation would be.

We should introduce an approach to reflow them in a meaningful way.

There is a good mathml-core issue to track, which has some CSS ideas: w3c/mathml-core#127

Better linkable fragment UX

A simple upgrade to the fragment markup would be to have an anchored # button which points to the current heading.

Add to that a reframing of the CSS, where headings get a top padding (say 1em), and we get a nice landing experience, as in this site.

Making it visible on hover is a nice extra touch. The only question is whether we should be adding a post-processing theme to latexml (i.e. implement this in XSLT), or do this in the final Rocket web service (either on serve, or as a Javascript patch).

responsive tables

Tables are pretty hard to navigate on a vertical phone display, as bad as a PDF table would be.

We should introduce an approach to reflow them in a meaningful way.

Custom selection highlights?

I stumbled on a blog that had enabled custom selection highlights which seemed nice. For ar5iv, they would be roughly equivalent to:

:root {
  --background_contrast_pop: rgba(157, 157, 171, 0.4);
}

[data-theme="dark"] .ltx_document ::selection, .ltx_document ::-moz-selection {
  background-color: var(--background_contrast_pop, #724714);
}
[data-theme="light"] .ltx_document ::selection, .ltx_document ::-moz-selection {
  background-color: var(--background_contrast_pop, #8db8eb);
}

Some early testing comments:

  • The MathML support is a bit inconsistent in Firefox, it looks like <mo> elements are not covered?
  • The Firefox selections seem to encounter some lag with the custom rule - especially on a large document. Is that annoying to lay users?
  • Also if desired, what are the most reasonable colors?

Shelving it as an issue for now, but if anyone wants to take over and experiment - feel free and let me know.

Default to prefers-color-scheme without JS

At the moment, ar5iv theme defaults to light when javascript is disabled.

It would be nice to default to prefers-color-scheme instead so that:

  1. it works without JS
  2. it does not blink from white to dark on slow connections or devices

This could be done by following the example of the CSS of the furo theme, for instance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.