Code Monkey home page Code Monkey logo

Comments (3)

jhildenbiddle avatar jhildenbiddle commented on September 2, 2024 2

Hi @marcobambini.

Changing the sidebar toggle position/behavior to match docsify's "Vue" theme isn't easily done with CSS custom properties, but you can always write your own custom CSS to override the docsify-themeable CSS.

Include this CSS in a <style> tag after the theme <link>:

.sidebar-toggle .sidebar-toggle-button {
    top: auto;
    bottom: 0;
    transition: transform var(--sidebar-transition-duration) ease-out;
}

body.close .sidebar-toggle .sidebar-toggle-button {
    transform: translate(calc(0px - var(--sidebar-width)));
}


@media (min-width: 48em) {
    .sidebar-toggle .sidebar-toggle-button {
        transform: translate(calc(0px - var(--sidebar-width)));
    }

    body.close .sidebar-toggle .sidebar-toggle-button {
        transform: translate(0);
    }
}

FWIW, the position of the sidebar toggle was changed for docisfy-themeable to address a handful of issues with docsify's "bottom-left" positioning. Specifically, the toggle is more discoverable, won't overlap sidebar content (when visible) or markdown content (when sidebar is hidden), and wont cause iOS's bottom-navigation bar to appear when tapped (thereby requiring two taps to actually toggle the sidebar).

Hope this helps.

from docsify-themeable.

marcobambini avatar marcobambini commented on September 2, 2024

It helps a lot.
Thank you very much!

from docsify-themeable.

Fmstrat avatar Fmstrat commented on September 2, 2024

The above no longer works. Use this instead:

.sidebar-toggle {
	background-color: unset;
	position: fixed !important;
	top: 0 !important;
	bottom: auto !important;
	padding: 10px 10px 10px 10px !important;
}

@media screen and (max-width: 768px) {
	.markdown-section {
		padding: 16px 16px 16px 36px !important;
	}
}

from docsify-themeable.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.