Giter Club home page Giter Club logo

brandonmcconnell / typed.css Goto Github PK

View Code? Open in Web Editor NEW
201.0 201.0 16.0 67 KB

A fully functional and flexible typewriter mixin for SCSS, with Less and Stylus support coming soon! Typed.css supports multiple strings, multi-line strings, variable speeds, per-string styling, animated caret (blinking insertion cursor), directional type-pausing, and much more. It's even accessible! ✨

Home Page: https://typedcss.com

License: Creative Commons Zero v1.0 Universal

SCSS 100.00%
animated-text animation animation-css css css-animations less lesscss scss scss-mixins scss-modules stylus stylus-css typewriter typewriter-animation typewriter-effect typing-animation typing-effect

typed.css's Introduction

Hi there, I'm Brandon

This is just one of several places where I tinker with ideas, burn the midnight oil, fix bugs and inadvertently end up creating more of them in the end, but alas… c'est la vie d'un développeur.

Follow branmcconnell on X (formerly Twitter)
 
👔 I’m currently employed at Carevoyance at Definitive Healthcare.
📚 I’m currently learning Svelte, SvelteKit, D3, LayerCake, PostGreSQL.
👯 I’m looking to collaborate on a new idea surrounding git versioning.
🤝 I’m looking for help maintaining and growing TypedCSS.
👨‍💻 Explore some of my tinkering on CodePen.
💬 Ask me about CSS, SCSS, Tailwind, JavaScript, React, or Svelte.
📫 You can reach me on Twitter or via email.
📄 Learn more about my professional experience on LinkedIn or download my resume.
When I'm not flushing out lines of code faster than Eminem raps (or occasionally staring at my screen blankly), I enjoy traveling 🏔, photography 📸, playing sports 🏓, hiking 🥾, and spending time with friends and family 👨‍👩‍👧‍👦.

My latest StackOverflow activity

My latest tweets

Connect with me

branmcconnell brandonmcconnell brandonmcconnell brandonmcconnell ourdailybrad brandonmcconnell brandonmcconnell brandonmcconnell brandonmcconnell @brandonmcconnell brandonmcconnell

Languages and Tools

appwrite babel bash bootstrap css3 d3js docker express figma gcp git graphql html5 ifttt illustrator invision javascript jest linux mongodb mysql nextjs nodejs oracle photoshop php postgresql postman react sass sketch svelte tailwind typescript webpack xd zapier

Support me

brandonmcconnell





GitHub Profile Stats

   brandonmcconnell
☝🏼 Click to expand/collapse detailed stats
 
brandonmcconnell

brandonmcconnell

brandonmcconnell

typed.css's People

Contributors

brandonmcconnell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

typed.css's Issues

Possible to hide the carat after animation complete?

Hi Brandon,

Apologies for raising an "issue" for what is essentially a question - I scoured the docs and it doesn't look like it's possible to hide the carat after the animation is complete (where the iterations parameter has been set).

Additionally I've been trying to find a way to overwrite the prefix text so I can do something like:

.typing {
    @include typed(
        " the real life",
        " just fantasy",
        1,
        (
            iterations: 1,
            prefix: "Is this",
            end-on: "Caught in a landslide, no escape from reality"
        )
    );
}

Is this stuff possible? Feel free to respond and then delete this issue since it isn't one. Sorry, I don't use GitHub much and was unsure how else to reach out to you.

Code breaks on a high type-pausing

I want to animate three strings and display the last string for a long time before re-looping. The code I currently use is:
@include typed("String1", "String2", "String3<[100]>")

Problem is that I want to display the last string even longer, but as soon as I start using longer type-pausing (for example <[150]>), save the code, reload the page, the page gets stuck on reloading. If I change the type-pausing back to 100 and reload, the page works again as before.

[Deprecation Warning] Future change to interpolation operator in SASS

I'm compiling typed.scss using the jekyll-sass-converter v1.5.2 gem under Jekyll 3.8.5 (Ruby 2.7.7).

This mean's I'm compiling typed.scss using Ruby SASS 3.4. Ruby sass has been entirely deprecated since 2019, but I'd like to flag this issue anyways in case the syntax change causes any issues for DartSass or LibSass users.

I'm getting this warning that the following use of #{} syntax will be deprecated in a "future version"

DEPRECATION WARNING on line 416 of {path_to_library}/typed.scss:
#{} interpolation near operators will be simplified in a future version of Sass.
To preserve the current behavior, use quotes:

  unquote("#{str-slice($fwd-string, 1, $j)}")

DEPRECATION WARNING on line 418 of {path_to_library}/typed.scss:
#{} interpolation near operators will be simplified in a future version of Sass.
To preserve the current behavior, use quotes:

  unquote("#{str-slice($bwd-string, 1, $bwd-length - ($j - $fwd-length))}")

Error typed.scss

Not compatible with the latest version of Sass, which is disallowing naming a function "--typed-percent-calc." It also mentions an error in the CSS code that is generated by the library, which is not a valid selector.

use var(--text) for text

Hi, great work. I try to use variables in my scss files for i18n purposes, but when I use var(--variable) print "var(--variable)".

image

image

Is it possible to use variables for text?

I can't use the function twice

I'm using the function like this but for both the displayed text is "••••••••••••••••••••"

.windows-viewport.loaded .viewport-locked .password {
	@include typed(
		"••••••••••••••••••••",
		null,
		(delay: 2, caret-width: 2px, caret-space: 2px, iterations: 0)
	);
}

#about-presentation {
	@include typed(
		"text",
		(type: .1), (caret-width: 2px, caret-space: 2px)
	);
}

Not able to use Examples from repo example

I copied typed.scss in local folder and imported it @import '../mixins/typed.scss'; in local base.scss
if we use mixin like below

@include typed("String 1", "String 2");

its throwing error:
SassError: Invalid CSS after "... 0.08, 1, 8.88,": expected selector, was '"String 1" "String ' on line 405 of styles/mixins/typed.scss, in mixin 'typed' from line 71 of styles/base/base.scss from line 3 of styles/index.scss

Feature request: adjustable animation delay

Whenever the page I'm using the animation on is reloaded, other animations in the page started earlier than the type animation, which was like around a second before it starts. It would be nice if it starts as soon as possible.

Character-timed delay syntax is displayed if included in end-on string

Including a character-timed delay in an end-on string results in the code being displayed.

Example:

.test {
    @include typed(
        "Testing...",
        1,
        (
            iterations: 1,
            end-on: "one, two and... <[15]>three")
    );
}

Results in the end-on string being temporarily displayed as:

one, two and... <[15]

before the "<[15]" disappears and the correct string is displayed:

one, two and... three

Syntax error in implementation of __div() function

I noticed an issue seemingly created by Pull Request #9 that was giving me the following sass compile error.

typed.scss:41:in 'typed': Function __div is missing argument $number2. (Sass::SyntaxError)

I believe this problem is occurring because the function implemented to divide two numbers, __div(a, b) is being called as __div(a / b) at multiple locations throughout the code.

I don't understand the LibSass / DartSass compatibility issue that makes the funciton __div() necessary in the first place, so I will not submit a pull request. I was however able to fix the compilation error and achieve a succesful typing animation when I went and replaced all instances of __div(a / b) with __div(a, b) (lines 41, 97, 145, 258).

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.