zyd , to Random stuff
@zyd@emacs.ch avatar

Ok, one small victory today. Finally figured out how to write user-styles in Nyxt. I'm not comfortable with OO style nor the Nyxt codebase but slime-doc-contribs, macroexpanding, and inspecting slots in slime helped a lot. Coming from Emacs, I definitely miss that level of built-in documentation I expect from an extensible environment but the Nyxt codebase does have good documentation strings of the important bits. Could be better with examples but I can get by.

(defparameter *user-fonts*<br></br>  "* {<br></br>    font-family: 'Atkinson Hyperlegible';<br></br>    font-size: 16px;<br></br>}<br></br><br></br>code, pre, pre code {<br></br>    font-family: 'PragmataPro Mono';<br></br>    font-size: 15px;<br></br>}<br></br>")<br></br><br></br>(define-configuration nyxt/mode/user-script:user-script-mode<br></br>  ((user-styles (list (make-instance 'nyxt/mode/user-script:user-style<br></br>                                     :code *user-fonts*<br></br>                                     :name "Fonts")))))<br></br>

Now, because its all nice CL, I can move forward and get rid of writing CSS in strings myself, and instead write it in a Lispy way using Shinmera's LASS library. But one step at a time.

mikesixgolf , to News from fediverse
@mikesixgolf@nerdica.net avatar
  • All
  • Subscribed
  • Moderated
  • Favorites
  • supersentai
  • WatchParties
  • Rutgers
  • jeremy
  • Lexington
  • cragsand
  • mead
  • RetroGamingNetwork
  • loren
  • steinbach
  • xyz
  • PowerRangers
  • AnarchoCapitalism
  • kamenrider
  • Mordhau
  • WarhammerFantasy
  • itdept
  • AgeRegression
  • mauerstrassenwetten
  • MidnightClan
  • space_engine
  • learnviet
  • bjj
  • Teensy
  • khanate
  • electropalaeography
  • neondivide
  • fandic
  • All magazines