{"id":16971547,"url":"https://github.com/johncoene/linne","last_synced_at":"2025-03-22T14:31:24.678Z","repository":{"id":85366382,"uuid":"280893500","full_name":"JohnCoene/linne","owner":"JohnCoene","description":"🌊 Write CSS in R","archived":false,"fork":false,"pushed_at":"2022-01-15T20:58:47.000Z","size":2046,"stargazers_count":77,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-01T15:29:49.589Z","etag":null,"topics":["css","r","rstats"],"latest_commit_sha":null,"homepage":"https://linne.john-coene.com","language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JohnCoene.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":"FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"JohnCoene"}},"created_at":"2020-07-19T15:24:04.000Z","updated_at":"2024-02-02T16:47:10.000Z","dependencies_parsed_at":"2023-07-02T00:31:36.872Z","dependency_job_id":null,"html_url":"https://github.com/JohnCoene/linne","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnCoene%2Flinne","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnCoene%2Flinne/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnCoene%2Flinne/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JohnCoene%2Flinne/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JohnCoene","download_url":"https://codeload.github.com/JohnCoene/linne/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244217920,"owners_count":20417677,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["css","r","rstats"],"created_at":"2024-10-14T00:52:25.226Z","updated_at":"2025-03-22T14:31:24.157Z","avatar_url":"https://github.com/JohnCoene.png","language":"R","funding_links":["https://github.com/sponsors/JohnCoene"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"man/figures/logo.png\" height=\"250px\" /\u003e\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/JohnCoene/linne/workflows/R-CMD-check/badge.svg)](https://github.com/JohnCoene/linne/actions)\n[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/JohnCoene/linne?branch=master\u0026svg=true)](https://ci.appveyor.com/project/JohnCoene/linne)\n[![Coveralls test coverage](https://coveralls.io/repos/github/JohnCoene/linne/badge.svg)](https://coveralls.io/github/JohnCoene/linne)\n\u003c!-- badges: end --\u003e\n\nCSS in R\n\n[Website](https://linne.john-coene.com/) | [Get Started](https://linne.john-coene.com/articles/get-started.html)\n\n\u003c/div\u003e\n\n## Installation\n\nInstall the stable version from CRAN.\n\n``` r\ninstall.packages(\"linne\")\n```\n\nOr install the development version from Github.\n\n``` r\n# install.packages(\"remotes\")\nremotes::install_github(\"JohnCoene/linne\")\n```\n\n## Example\n\n{linne} contains a single reference class which comes with just a few core methods. Always start with the `new` method to instantiate a new class.\n\n```r\nlibrary(linne)\n\nlinne \u003c- Linne$new()\n```\n\nThere are two core methods to {linne}:\n\n- `define` - Define a global variable\n- `rule` - Add a CSS rule\n\nLet's say you want to change the look and feel of this button in a shiny application.\n\n```r\nactionButton(inputId = \"myButton\", label = \"Click me\")\n```\n\nUsing {linne} we define a CSS rule with the `rule` method to change how it looks.\n\n```r\nlibrary(linne)\n\nlinne \u003c- Linne$\n  new()$\n  rule(\n    sel_input(\"myButton\"), # inputId = \"myButton\"\n    backgroundColor = 'red', \n    fontSize = 20,\n    color = \"white\"\n  )\n```\n\n{linne} will automatically convert integers and numerics to pixels, therefore the above changes the font size to 20 pixels.\n\n```r\nlibrary(linne)\nlibrary(shiny)\n\nui \u003c- fluidPage(\n  linne$include(), # include the CSS\n  actionButton(inputId = \"myButton\", label = \"Click me\")\n)\n\nserver \u003c- function(input, output){}\n\nshinyApp(ui, server)\n```\n\n## Code of Conduct\n\nPlease note that the linne project is released with a [Contributor Code of Conduct](https://linne.john-coene.com/CODE_OF_CONDUCT.html). By contributing to this project, you agree to abide by its terms.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohncoene%2Flinne","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohncoene%2Flinne","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohncoene%2Flinne/lists"}