All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
4.1.2 (2024-10-05)
- no significant changes, this release only reduces the compiled bundle size
4.1.1 (2024-05-17)
- immediately dismissing popovers on iOS (#1893) (98fd2d3)
- popover with very narrow text (#1894) (5c7633e)
4.1.0 (2023-12-17)
4.0.1 (2023-09-19)
4.0.0 (2023-09-19)
4.0.0-11 (2023-09-19)
- deps: update dependency @pacote/get-style to v2.0.2 (#1678) (a31708a)
- deps: update dependency @pacote/pixels to v2.0.2 (#1679) (ff3a45c)
- deps: update dependency @pacote/throttle to v2.0.2 (#1680) (6019fa9)
- footnote content occasionally rendered too narrow (#1702) (bae1fa6)
4.0.0-10 (2023-08-07)
- deps: update dependency @pacote/get-style to v2 (#1522) (b5a93d2)
- deps: update dependency @pacote/get-style to v2.0.1 (#1537) (32a72b0)
- deps: update dependency @pacote/pixels to v2 (#1523) (34de8f2)
- deps: update dependency @pacote/pixels to v2.0.1 (#1538) (c2b470d)
- deps: update dependency @pacote/throttle to v2 (#1525) (0c71c86)
- deps: update dependency @pacote/throttle to v2.0.1 (#1539) (9d6fe90)
4.0.0-9 (2023-03-09)
Removed built-in CSS.escape
polyfill. littlefoot will only work on supported browsers if you provide a polyfill before setting up footnotes.
4.0.0-7 (2023-03-06)
- vertical scrolling indicator position (9c1d97a)
4.0.0-6 (2021-01-19)
- improve default button contrast (#419) (82492d4)
- popover z-index everywhere (#658) (be257e7)
- sticky scrolling indicator moving on page scroll (f2c845e)
4.0.0-5 (2021-01-08)
4.0.0-4 (2020-11-27)
- position is above by default (45de8ac)
4.0.0-3 (2020-11-24)
4.0.0-2 (2020-11-22)
- popover margin (e246f20)
4.0.0-1 (2020-11-22)
- remove aria-expanded from default button template (a2edfa6)
- scope custom properties instead of polluting :root (88392a3)
4.0.0-0 (2020-10-30)
The new version overhauls the style definitions of littlefoot elements. This is a breaking change because users will experience visual changes.
Additionally, changes may affect users who have customised their button or popover templates, those who have custom styles applied to footnote elements, or those targetting elements using custom logic.
- Theming support through CSS custom properties.
- Overhauled default theme.
- More robust selector escaping (uses CSS.escape in supporting browsers).
- Restore popover fade effect (1dcbdcd).
3.4.1 (2020-09-24)
3.4.0 (2020-08-04)
3.3.2 (2020-07-23)
3.3.1 (2020-06-24)
- a11y: allow tabbing to content when it overflows popover (0ecde14)
3.3.0 (2020-06-23)
3.2.5 (2020-05-20)
3.2.4 (2020-03-26)
- remove body scroll locking over content shifting issues (0ce0369)
3.2.3 (2020-02-13)
- styles: adjust content bottom padding (93d349c)
3.2.2 (2020-02-13)
- styles: popover content padding tweaks (7f99b66)
- better locking of body scroll (d9b609c)
- prevent page scroll when scrolling footnote content (3192512)
- remove deprecated mousewheel event (4b17eb6)
3.2.1 (2019-12-03)
3.2.0 (2019-11-21)
- allow passing a timeout to activate() (13563e0)
3.1.7 (2019-11-19)
3.1.6 (2019-11-10)
3.1.5 (2019-10-07)
3.1.4 (2019-10-07)
3.1.3 (2019-09-02)
- use initial font-style in footnote content (c843357)
3.1.2 (2019-08-17)
3.1.1 (2019-08-17)
3.1.0 (2019-08-17)
3.0.0 (2019-08-14)
- This change removes a partial check for existing footnote-like elements in the document, which adjusted the ID of new footnotes to prevent collisions (an unlikely scenario).
-
footnote detection whose links contain a URL before the fragment (2e24293), closes #24
-
change internal footnote model, create popovers on setup (728e485)
2.0.3 (2019-07-15)
- Fixes an issue with the popover's bottom padding on Firefox (#21).
2.0.2 (2019-06-27)
- Fixed regression with pressing the Escape key to dismiss footnotes.
2.0.0 (2019-06-10)
littlefoot has been rewritten in TypeScript, which enabled a cleaner architecture and slight reduction in bundle size. Browser compatibility is not as extensive as with 1.0.x, and I will no longer support older versions of Internet Explorer.
Testing framework was replaced with Jest and Cypress, and tests were adapted for simplicity.
This version introduces a number of breaking changes to advanced features. If you've been using littlefoot without relying on custom templates or its .activate()
and .dismiss()
methods, and don't need to provide support for older browsers, it should be safe to upgrade.
- New
.unmount()
method to completely remove littlefoot footnotes from the document and return it to its original structure.
- Breaking change:
.activate()
and.dismiss()
methods now receive the footnote identifier instead of a selector. The identifier is the sequential ordering of all footnotes in the document, starting from 1. - Default
contentTemplate
andbuttonTemplate
templates include fewer attributes and improperly-defined custom templates are now less likely to break functionality. - Improved pixel size calculations to determine popover height.
- Improved handling of popover hover state when dismissing.
- Resolved an issue with the
anchorParentSelector
element not being hidden (#17). - Resolved an issue with inherited font weights and sizes when a footnote was included inside header or
<strong>
tags (#18). - Reduced dependency on DOM element properties for critical functionality.
- Breaking change: The
.activate()
method no longer takes a custom class name to be added to the popover, as the feature is redundant. You can manipulate both the button and the popover upon activation via theactivateCallback
setting. - Breaking change: The
footnote-processed
class is no longer applied to processed footnotes. Only thefootnote-print-only
is used now. - Breaking change: The
is-hover
class is no longer applied to hovered footnotes. - The purpose of the
footnoteParentClass
setting ported over from Bigfoot wasn't clear, and it did not appear to change behaviour, so it was removed.
In forking the Bigfoot.js project and adapting it for simplicity, I have embraced a Decisions, not options philosophy. As such, some features provided by Bigfoot.js have been replaced with simpler alternatives, a sensible set of defaults, and in some cases removed altogether.
Users planning to migrate from Bigfoot should therefore be aware of the following changes.
allowMultipleFN
was renamed toallowMultiple
.anchorParentTagname
was renamed toanchorParentSelector
.deleteOnUnhover
was renamed todismissOnUnhover
.footnoteTagname
was renamed tofootnoteSelector
.popoverCreateDelay
was renamed toactivateDelay
.popoverDeleteDelay
was renamed todismissDelay
.buttonMarkup
was replaced withbuttonTemplate
. Please refer to the documentation for a list of valid tokens.contentMarkup
was replaced withcontentTemplate
. Please refer to the documentation for a list of valid tokens.useFootnoteOnlyOnce
was replaced withallowDuplicates
. The truth value should be flipped.
actionOriginalFN
was removed. All original footnotes are only hidden, leaving you free to select footnote DOM elements for removal if you need them gone from the document.breakpoints
was removed. All size-aware display changes should be declared via CSS@media
queries.footnoteParentClass
was removed. After some tests, I couldn't determine its purpose or benefits.maxWidthRelativeTo
was removed. It was undocumented and will not be missed.preventPageScroll
was removed. Scrolling inside a scrollable footnote will not trigger a page scroll.positionContent
was removed. Popover positioning is now always in effect.
Methods on the returning object were overhauled, removing breakpoint logic.
activate()
will no longer return a list of activated popovers, it takes a footnote ID instead of a selector, and no longer allows setting a custom class on the popover element through it. UseactivateCallback
if you wish to manipulate the button or popover elements.close()
was renameddismiss()
, it optionally takes a footnote ID instead of a selector, and will no longer return the list of deactivated buttons.
addBreakpoint()
andremoveBreakpoint()
were removed, set breakpoint-dependent styles using CSS.- The
createPopover()
alias was removed, useactivate()
. - The
removePopovers()
alias was removed, usedismiss()
. reposition()
andrepositionFeet()
were removed.
All style variants have been folded into a single stylesheet. The footnote popover is now automatically fixed to the bottom of the viewport on smaller screens, and you may alter this behaviour by overriding the CSS.
Breakpoint methods were dropped in favour of a CSS-based approach. Override the stylesheets to customize screen width limits.
The markup for the footnote button ellipsis changed from three <svg>
elements with a <circle>
each to a single <svg>
element containing all three <circle>
s.