zyd,
@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.

#CommonLisp #Nyxt

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • mdbf
  • osvaldo12
  • magazineikmin
  • GTA5RPClips
  • rosin
  • thenastyranch
  • Youngstown
  • cubers
  • slotface
  • khanakhh
  • kavyap
  • InstantRegret
  • Durango
  • JUstTest
  • everett
  • ethstaker
  • cisconetworking
  • Leos
  • provamag3
  • modclub
  • ngwrru68w68
  • tacticalgear
  • tester
  • megavids
  • normalnudes
  • anitta
  • lostlight
  • All magazines