{"id":18907645,"url":"https://github.com/tomodomoco/sass-tooltips","last_synced_at":"2025-12-12T03:22:45.538Z","repository":{"id":58232231,"uuid":"63427384","full_name":"TomodomoCo/sass-tooltips","owner":"TomodomoCo","description":"A portable Sass-based approach for simple text tooltips on arbitrary HTML elements","archived":false,"fork":false,"pushed_at":"2018-10-25T19:28:41.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-04-14T14:22:34.780Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TomodomoCo.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-07-15T14:21:30.000Z","updated_at":"2018-10-25T19:28:43.000Z","dependencies_parsed_at":"2022-08-31T00:20:50.190Z","dependency_job_id":null,"html_url":"https://github.com/TomodomoCo/sass-tooltips","commit_stats":null,"previous_names":["vanpattenmedia/vpm-tooltips"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomodomoCo%2Fsass-tooltips","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomodomoCo%2Fsass-tooltips/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomodomoCo%2Fsass-tooltips/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomodomoCo%2Fsass-tooltips/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomodomoCo","download_url":"https://codeload.github.com/TomodomoCo/sass-tooltips/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239891263,"owners_count":19714100,"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":[],"created_at":"2024-11-08T09:22:37.977Z","updated_at":"2025-12-12T03:22:40.471Z","avatar_url":"https://github.com/TomodomoCo.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sass-tooltips\n\n**A portable Sass-based approach for simple text tooltips on arbitrary HTML elements.**\n\nInstall via `npm` (or `yarn` if that's your thing):\n\n```\nnpm install --save-dev @tomodomo/sass-tooltips\n```\n\n## Usage\n\n`sass-tooltips` is [eyeglass](https://github.com/sass-eyeglass/eyeglass)-aware. If you're using it, simply import with…\n\n```scss\n@import \"sass-tooltips\";\n```\n\nOtherwise, something like this should work:\n\n```scss\n@import \"path/to/node_modules/@tomodomo/sass-tooltips/sass\";\n```\n\nThen, in your HTML, add `data-tip-[direction]=\"Tooltip content here\"` to the element you would like the tooltip targeted at, where `[direction]` is one of `tl`, `tm`, `tr`, `bl`, `bm`, or `br` (an abbreviation for top/bottom, left/middle/right). This corresponds to the direction the tooltip arrow is pointing.\n\nFor example:\n\n```html\n\u003ca href=\"https://github.com/vanpattenmedia/vpm-tooltips\" data-tip-tm=\"What an awesome tooltip library!\"\u003eVPM Tooltips\u003c/a\u003e\n```\n\nYou can see how each direction is rendered in the screenshot below:\n\n![Screenshot of the sass-tooltips library showing the directions that tooltips can point](https://raw.githubusercontent.com/TomodomoCo/sass-tooltips/gh-pages/screenshot.png)\n\n## Options\n\nThe library can be customised with a number of variables. The variables, and their default values, are as follows:\n\n```sass\n$sass-tooltip--background: black;\n$sass-tooltip--text-color: white;\n\n$sass-tooltip--font-family: inherit;\n$sass-tooltip--font-size: inherit;\n$sass-tooltip--text-shadow: none;\n\n$sass-tooltip--arrow-width: 0.875em;\n$sass-tooltip--arrow-height: 0.6em;\n\n$sass-tooltip--border-radius: 2px;\n$sass-tooltip--padding: 0.45em 0.75em;\n$sass-tooltip--z-index: 99;\n```\n\n## Caveats\n\nThe library makes use of `calc()`, and thus [will not work in IE8, Opera Mini, or earlier Android browsers](http://caniuse.com/calc). (A pull request that safely eliminates the `calc()` requirement would be [happily accepted](https://github.com/vanpattenmedia/vpm-tooltips/pulls)!)\n\nPlacing your tooltip text in the data attribute alone is _not sufficient for accessibility_. You might wish to set an `aria-label` attribute on your element, or use another recommended best practice to make sure you're accomomdating all users.\n\n## Acknowledgements\n\nThis method of inserting tooltips was inspired by the [Daniel-Hug/tooltips](https://github.com/Daniel-Hug/tooltips) library.\n\n## About Tomodomo\n\nTomodomo is a creative agency for magazine publishers. We use custom design and technology to speed up your editorial workflow, engage your readers, and build sustainable subscription revenue for your business.\n\nLearn more at [tomodomo.co](https://tomodomo.co) or email us: [hello@tomodomo.co](mailto:hello@tomodomo.co)\n\n## License \u0026 Conduct\n\nThis project is licensed under the terms of the MIT License, included in `LICENSE.md`.\n\nAll open source Tomodomo projects follow a strict code of conduct, included in `CODEOFCONDUCT.md`. We ask that all contributors adhere to the standards and guidelines in that document.\n\nThank you!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomodomoco%2Fsass-tooltips","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomodomoco%2Fsass-tooltips","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomodomoco%2Fsass-tooltips/lists"}